Documentation ¶
Index ¶
- func ConvertToIntList(stringList []string) ([]int, error)
- func DaysBetween(t1, t2 time.Time) int
- func GetDefaultValue(value interface{}) interface{}
- func GetMax(value1, value2 interface{}) (interface{}, error)
- func GetMin(value1, value2 interface{}) (interface{}, error)
- func IsSameDay(t1, t2 time.Time) bool
- func IsType(value1, value2 interface{}) bool
- func IsValidEmail(email string) bool
- func MapToStringSlice(inputMap map[string]string) ([]string, error)
- func StringSliceToMap(inputSlice []string) (map[string]string, error)
- func ToLowerCase(str string) string
- func ToUpperCase(str string) string
- func TrimSpaces(str string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToIntList ¶
func GetDefaultValue ¶
func GetDefaultValue(value interface{}) interface{}
GetDefaultValue 返回值的默认值(零值)
func GetMax ¶
func GetMax(value1, value2 interface{}) (interface{}, error)
GetMax 返回两个数值中的最大值,支持 int, float64 等常见类型
func GetMin ¶
func GetMin(value1, value2 interface{}) (interface{}, error)
GetMin 返回两个数值中的最小值,支持 int, float64 等常见类型
func MapToStringSlice ¶
MapToStringSlice 将 map 转换为 []string,要求偶数个元素,key和值依次排列
func StringSliceToMap ¶
StringSliceToMap 将 []string 转换为 map[string]string,要求输入长度为偶数,奇数索引为 key,偶数索引为 value
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.