Example #1
0
func IsWeb(ua *user_agent.UserAgent) bool {
	return !ua.Mobile()
}
Example #2
0
func IsAndroid(ua *user_agent.UserAgent) bool {
	os := ua.OS()
	return ua.Mobile() && strings.Contains(os, "Android")
}
Example #3
0
func IsWeChat(ua *user_agent.UserAgent) bool {
	return ua.Mobile() && ua.Wecaht()
}
Example #4
0
func IsIOS(ua *user_agent.UserAgent) bool {
	os := ua.OS()
	return ua.Mobile() && strings.Contains(os, "iPhone OS")
}
Example #5
0
func IsMobile(ua *user_agent.UserAgent) bool {
	return ua.Mobile()
}