(t *testing.T)
| 8 | ) |
| 9 | |
| 10 | func TestIsAgentFromUserAgent(t *testing.T) { |
| 11 | t.Log(agents.IsAgentFromUserAgent("Mozilla/5.0 (Linux;u;Android 4.2.2;zh-cn;) AppleWebKit/534.46 (KHTML,like Gecko) Version/5.1 Mobile Safari/10600.6.3 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)")) |
| 12 | t.Log(agents.IsAgentFromUserAgent("Mozilla/5.0 (Linux;u;Android 4.2.2;zh-cn;)")) |
| 13 | } |
| 14 | |
| 15 | func BenchmarkIsAgentFromUserAgent(b *testing.B) { |
| 16 | for i := 0; i < b.N; i++ { |
nothing calls this directly
no test coverage detected