Documentation ¶
Overview ¶
Package utils 一些常用功能的集合
Index ¶
- func CurrentDir() stringdeprecated
- func CurrentFile() stringdeprecated
- func CurrentFunction() stringdeprecated
- func CurrentLine() intdeprecated
- func CurrentPath(path string) stringdeprecated
- func DumpGoFile(path, content string) errordeprecated
- func DumpGoSource(path string, content []byte) errordeprecated
- func FileExists(path string) bool
- func GetSystemLanguageTag() (language.Tag, error)deprecated
- func HasDuplication(slice interface{}, eq func(i, j int) bool) int
- func MD5(str string) string
- func Merge(deep bool, elems ...interface{}) error
- func Round(v float64) int64
- func SplitPath(path string) []string
- func TraceStack(level int, msg ...interface{}) (string, error)deprecated
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CurrentDir
deprecated
added in
v1.2.0
func CurrentFile
deprecated
added in
v1.2.0
func CurrentFunction
deprecated
added in
v1.2.0
func CurrentFunction() string
CurrentFunction 获取`调用者`所在的函数名
Deprecated: 请使用 source.CurrentFunction 代替
func CurrentLine
deprecated
added in
v1.2.0
func CurrentPath
deprecated
added in
v1.2.0
func DumpGoFile
deprecated
added in
v1.1.0
func DumpGoSource
deprecated
added in
v1.2.0
func GetSystemLanguageTag
deprecated
added in
v1.3.0
func HasDuplication ¶ added in v1.4.0
HasDuplication 检测数组中是否包含重复的值
slice 需要检测的数组或是切片,其它类型会 panic; eq 对比数组中两个值是否相等,相等需要返回 true; 返回值表示存在相等值时,第二个值在数组中的下标值;
func TraceStack
deprecated
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.