文件名称:user_agent:Go编程语言的HTTP用户代理解析器
文件大小:24KB
文件格式:ZIP
更新时间:2024-02-24 08:13:05
go golang user-agent user-agent-parser useragent
UserAgent是一个Go库,用于解析HTTP用户代理。 举个例子: package main import ( "fmt" "github.com/mssola/user_agent" ) func main () { // The "New" function will create a new UserAgent object and it will parse // the given string. If you need to parse more strings, you can re-use // this object and call: ua.Parse("another string") ua := user_agent . New ( "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11" ) fmt . Printf ( "%v \n " , u
【文件预览】:
user_agent-master
----go.mod(45B)
----all_test.go(33KB)
----.github()
--------PULL_REQUEST_TEMPLATE.md(648B)
--------ISSUE_TEMPLATE()
----ci()
--------install.sh(542B)
--------lint.sh(1KB)
----bot.go(5KB)
----CONTRIBUTING.md(2KB)
----.travis.yml(372B)
----user_agent.go(5KB)
----LICENSE(1KB)
----README.md(3KB)
----Makefile(1KB)
----browser.go(5KB)
----CHANGELOG.md(3KB)
----operating_systems.go(9KB)