2023-08-10 14:36:38 +08:00
|
|
|
// Package util ...
|
|
|
|
//
|
|
|
|
// Description : util ...
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 2023-08-10 14:34
|
|
|
|
package util
|
|
|
|
|
|
|
|
var (
|
|
|
|
// UserAgent ...
|
|
|
|
UserAgent *userAgent
|
|
|
|
// Browser ...
|
|
|
|
Browser *browser
|
|
|
|
// IP ...
|
|
|
|
IP *ip
|
|
|
|
// URL ...
|
|
|
|
URL *ownURL
|
2023-08-10 17:30:49 +08:00
|
|
|
// JWT ...
|
|
|
|
JWT *ownJwt
|
2023-08-10 14:36:38 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
UserAgent = &userAgent{
|
|
|
|
list: defaultUserAgentList,
|
|
|
|
}
|
|
|
|
Browser = &browser{
|
|
|
|
commandTable: map[string]string{
|
|
|
|
"windows": "start",
|
|
|
|
"darwin": "open",
|
|
|
|
"linux": "xdg-open",
|
|
|
|
},
|
|
|
|
}
|
|
|
|
IP = &ip{}
|
|
|
|
URL = &ownURL{}
|
|
|
|
}
|