Documentation ¶
Overview ¶
Package ut is a Go utility library.
Index ¶
- func Domain(url string) string
- func FileSize(filePath string) (int64, bool)
- func ItemInSlice(item, list interface{}) bool
- func LimitLength(s string, length int, ellipses string) string
- func MatchAll(text, pattern string) [][]string
- func MatchOneOf(text string, patterns ...string) []string
- func Md5(text string) string
- func Range(min, max int) []int
- func Reverse(s string) string
- func TrimSpace(str string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ItemInSlice ¶
func ItemInSlice(item, list interface{}) bool
ItemInSlice if a item is in the list.
func LimitLength ¶
LimitLength limit the maximum length of the string.
func MatchOneOf ¶
MatchOneOf match one of the patterns.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.