2
0

Added IsChromeOS

This commit is contained in:
Miloš Mileusnić
2022-07-28 20:27:01 +02:00
parent 359628f177
commit 53cc9bf769
+6 -1
View File
@@ -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