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