Documentation
¶
Index ¶
- func AppPath() string
- func Date(ti int64, format string) string
- func DateS(ts string, format string) string
- func DateT(t time.Time, format string) string
- func EnsureAbs(path string) string
- func IntSliceDifference(slice1, slice2 []int) []int
- func IntSliceIntersect(slice1, slice2 []int) []int
- func IntSliceUnion(slice1, slice2 []int) []int
- func IsSliceContainsInt(sl []int, i int) bool
- func IsSliceContainsInt64(sl []int64, i int64) bool
- func IsSliceContainsStr(sl []string, str string) bool
- func ParseDateToStr(timeValue time.Time, format string) string
- func ParseStrToDate(timestr, format, locationName string) (time.Time, error)
- func TimeComparison(time1, time2 time.Time) int
- func WorkDir() string
- type StrTo
- func (f StrTo) Exist() bool
- func (f StrTo) Float64() (float64, error)
- func (f StrTo) Int() (int, error)
- func (f StrTo) Int64() (int64, error)
- func (f StrTo) MustFloat64() float64
- func (f StrTo) MustInt() int
- func (f StrTo) MustInt64() int64
- func (f StrTo) MustUint8() uint8
- func (f StrTo) String() string
- func (f StrTo) Uint8() (uint8, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DateT ¶
DateT .. Format time.Time struct to string MM - month - 01 M - month - 1, single bit DD - day - 02 D - day 2 YYYY - year - 2006 YY - year - 06 HH - 24 hours - 03 H - 24 hours - 3 hh - 12 hours - 03 h - 12 hours - 3 mm - minute - 04 m - minute - 4 ss - second - 05 s - second = 5
func IntSliceDifference ¶
IntSliceDifference int slice difference
func IsSliceContainsInt ¶
IsSliceContainsInt returns true if the int exists in given slice.
func IsSliceContainsInt64 ¶
IsSliceContainsInt64 returns true if the int64 exists in given slice.
func IsSliceContainsStr ¶
IsSliceContainsStr returns true if the string exists in given slice, ignore case.
func ParseDateToStr ¶
ParseDateToStr .. MM - month - 01 M - month - 1, single bit DD - day - 02 D - day 2 YYYY - year - 2006 YY - year - 06 HH - 24 hours - 03 H - 24 hours - 3 hh - 12 hours - 03 h - 12 hours - 3 mm - minute - 04 m - minute - 4 ss - second - 05 s - second = 5
func ParseStrToDate ¶
ParseStrToDate .. timeStr format locationName, when locationName is "", defaultLocation rely on system env.
func TimeComparison ¶
TimeComparison time 0 equal, 1 time1 greater than time2 2 time1 less than time2