Added IsChromeOS
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
package ua
|
package useragent
|
||||||
|
|
||||||
// IsWindows shorthand function to check if OS == Windows
|
// IsWindows shorthand function to check if OS == Windows
|
||||||
func (ua UserAgent) IsWindows() bool {
|
func (ua UserAgent) IsWindows() bool {
|
||||||
@@ -25,6 +25,11 @@ func (ua UserAgent) IsLinux() bool {
|
|||||||
return ua.OS == Linux
|
return ua.OS == Linux
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// IsChromeOS shorthand function to check if OS == CrOS
|
||||||
|
func (ua UserAgent) IsChromeOS() bool {
|
||||||
|
return ua.OS == ChromeOS || ua.OS == "CrOS"
|
||||||
|
}
|
||||||
|
|
||||||
// IsOpera shorthand function to check if Name == Opera
|
// IsOpera shorthand function to check if Name == Opera
|
||||||
func (ua UserAgent) IsOpera() bool {
|
func (ua UserAgent) IsOpera() bool {
|
||||||
return ua.Name == Opera
|
return ua.Name == Opera
|
||||||
|
|||||||
Reference in New Issue
Block a user