74 lines
1.2 KiB
Go
74 lines
1.2 KiB
Go
// Package util ...
|
|
//
|
|
// Description : util ...
|
|
//
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
//
|
|
// Date : 2022-05-14 14:22
|
|
package util
|
|
|
|
var (
|
|
// Cli ...
|
|
Cli *cli
|
|
// File ...
|
|
File *file
|
|
// Hash ...
|
|
Hash *hash
|
|
// IP ...
|
|
IP *ip
|
|
// JSON ...
|
|
JSON *ownJSON
|
|
// String ...
|
|
String *stringOperate
|
|
// Struct ...
|
|
Struct *ownStruct
|
|
// URL ...
|
|
URL *ownURL
|
|
// Map ...
|
|
Map *ownMap
|
|
// Calculate ...
|
|
Calculate *calculate
|
|
// Project ...
|
|
Project *project
|
|
// Array 数组操作
|
|
Array *array
|
|
// JWT ...
|
|
JWT *ownJwt
|
|
// UserAgent ...
|
|
UserAgent *userAgent
|
|
// Console 控制台输出数据
|
|
Console *console
|
|
// Browser 浏览器操作实例
|
|
Browser *browser
|
|
// PinYin 汉字转拼音
|
|
PinYin *pinYin
|
|
)
|
|
|
|
func init() {
|
|
Cli = &cli{}
|
|
File = &file{}
|
|
Hash = &hash{}
|
|
IP = &ip{}
|
|
JSON = &ownJSON{}
|
|
String = &stringOperate{}
|
|
Struct = &ownStruct{}
|
|
URL = &ownURL{}
|
|
Map = &ownMap{}
|
|
Calculate = &calculate{}
|
|
Project = &project{}
|
|
Array = &array{}
|
|
JWT = &ownJwt{}
|
|
UserAgent = &userAgent{
|
|
list: defaultUserAgentList,
|
|
}
|
|
Console = &console{}
|
|
Browser = &browser{
|
|
commandTable: map[string]string{
|
|
"windows": "start",
|
|
"darwin": "open",
|
|
"linux": "xdg-open",
|
|
},
|
|
}
|
|
PinYin = &pinYin{}
|
|
}
|