util/init.go

78 lines
1.3 KiB
Go
Raw Normal View History

2022-05-14 14:27:40 +08:00
// Package util ...
//
// Description : util ...
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 2022-05-14 14:22
package util
var (
// Cli ...
Cli *cli
// File ...
File *file
2022-05-14 14:45:14 +08:00
// Hash ...
Hash *hash
2022-05-14 14:58:22 +08:00
// IP ...
IP *ip
2022-05-14 15:05:20 +08:00
// JSON ...
JSON *ownJSON
2022-05-14 15:11:45 +08:00
// String ...
String *stringOperate
2022-05-14 15:22:53 +08:00
// Struct ...
Struct *ownStruct
2022-05-14 15:48:44 +08:00
// URL ...
URL *ownURL
2022-05-14 15:56:09 +08:00
// Map ...
Map *ownMap
2022-07-17 15:51:53 +08:00
// Calculate ...
Calculate *calculate
// Project ...
2023-03-30 14:49:38 +08:00
Project *project
2023-08-10 11:57:09 +08:00
// Array 数组操作
2023-03-30 14:49:38 +08:00
Array *array
2023-02-11 21:14:57 +08:00
// JWT ...
JWT *ownJwt
2023-03-31 18:58:14 +08:00
// UserAgent ...
UserAgent *userAgent
2023-04-04 16:26:02 +08:00
// Console 控制台输出数据
Console *console
// Browser 浏览器操作实例
Browser *browser
2023-05-04 18:40:25 +08:00
// StringConvert 字符串转为任意类型
StringConvert *stringConvert
2023-07-01 23:30:50 +08:00
// PinYin 汉字转拼音
PinYin *pinYin
2022-05-14 14:27:40 +08:00
)
func init() {
Cli = &cli{}
File = &file{}
2022-05-14 14:45:14 +08:00
Hash = &hash{}
2022-05-14 14:58:22 +08:00
IP = &ip{}
2022-05-14 15:05:20 +08:00
JSON = &ownJSON{}
2022-05-14 15:11:45 +08:00
String = &stringOperate{}
2022-05-14 15:22:53 +08:00
Struct = &ownStruct{}
2022-05-14 15:48:44 +08:00
URL = &ownURL{}
2022-05-14 15:56:09 +08:00
Map = &ownMap{}
2022-07-17 15:51:53 +08:00
Calculate = &calculate{}
2023-03-30 14:49:38 +08:00
Project = &project{}
Array = &array{}
2023-02-11 21:14:57 +08:00
JWT = &ownJwt{}
2023-03-31 18:58:14 +08:00
UserAgent = &userAgent{
list: defaultUserAgentList,
}
2023-04-04 16:26:02 +08:00
Console = &console{}
Browser = &browser{
commandTable: map[string]string{
"windows": "start",
"darwin": "open",
"linux": "xdg-open",
},
}
2023-05-04 18:40:25 +08:00
// StringConvert
StringConvert = &stringConvert{}
2023-07-01 23:30:50 +08:00
PinYin = &pinYin{}
2022-05-14 14:27:40 +08:00
}