78 lines
1.3 KiB
Go
78 lines
1.3 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
|
|
// Time ...
|
|
Time *ownTime
|
|
// URL ...
|
|
URL *ownURL
|
|
// Map ...
|
|
Map *ownMap
|
|
// Calculate ...
|
|
Calculate *calculate
|
|
// Project ...
|
|
Project *project
|
|
// 数组操作
|
|
Array *array
|
|
// JWT ...
|
|
JWT *ownJwt
|
|
// UserAgent ...
|
|
UserAgent *userAgent
|
|
// Console 控制台输出数据
|
|
Console *console
|
|
// Browser 浏览器操作实例
|
|
Browser *browser
|
|
// StringConvert 字符串转为任意类型
|
|
StringConvert *stringConvert
|
|
)
|
|
|
|
func init() {
|
|
Cli = &cli{}
|
|
File = &file{}
|
|
Hash = &hash{}
|
|
IP = &ip{}
|
|
JSON = &ownJSON{}
|
|
String = &stringOperate{}
|
|
Struct = &ownStruct{}
|
|
Time = &ownTime{}
|
|
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",
|
|
},
|
|
}
|
|
// StringConvert
|
|
StringConvert = &stringConvert{}
|
|
}
|