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