Documentation
¶
Index ¶
- Constants
- func Assert(b bool, text string)
- func Assertf(b bool, format string, args ...any)
- func CopyBytes(src []byte) (dst []byte)
- func DeserializeFromStringArray(i any, stringArray []string) (err error)
- func DeserializeStructFromExcelRow(e any, row *xlsx.Row) (err error)
- func Format(format string, args ...any) string
- func FormatFieldName(rawName string) string
- func GetBuffer() *bytes.Buffer
- func GetDurationToNextHalfHour() time.Duration
- func GetDurationToNextMinute() time.Duration
- func GetFileBaseName(file string) string
- func GetFileName(file string) string
- func GetNextHalfHour() time.Time
- func GetNextMinute() time.Time
- func GetNextSecond() time.Time
- func GetProgramFileAbsPath() (string, error)
- func GetProgramFileBaseName() (string, error)
- func GetProgramFileName() (string, error)
- func GetTheDayBeginTime(src time.Time, days int) (desc time.Time)
- func GetTheWeekBeginTime(src time.Time) (desc time.Time)
- func GetThisMinute() time.Time
- func GetThisSecond() time.Time
- func GetTypeName(i any) string
- func IsDirOrFileExist(path string) error
- func IsSameDay(t1 time.Time, t2 time.Time) bool
- func IsSameDayUnixTimeStamp(t1 int64, t2 int64) bool
- func LoadJSONFile(file string, dst any) error
- func LowerFirst(str string) string
- func MD5Sum(input []byte) (output []byte)
- func MD5Sumf(format string, args ...any) (output []byte)
- func MakeSignalChannel(sig ...os.Signal) chan os.Signal
- func MkDir(path string) error
- func MustGetProgramFileAbsPath() string
- func MustGetProgramFileBaseName() string
- func MustGetProgramFileName() string
- func MustMkDir(path string)
- func ParseTimeString(strTime string) (time.Time, error)
- func ParseTimeStringByFormat(fmt string, strTime string) (time.Time, error)
- func ParseTimeStringInLocation(strTime string) (time.Time, error)
- func ParseTimeStringInLocationByFormat(fmt string, strTime string) (time.Time, error)
- func PutBuffer(b *bytes.Buffer)
- func ReadLineFromConsole() (string, error)
- func TruncateExtend(file string) string
- func UpperFirst(str string) string
- func WaitExitSignal() os.Signal
- func Walk(dir string, extend string, whiteList []string, blackList []string, ...) (err error)
- func Zip(src []string, dest string) error
Constants ¶
View Source
const DefaultTimeFormat = "2006-01-02 15:04:05"
Variables ¶
This section is empty.
Functions ¶
func GetDurationToNextHalfHour ¶
GetDurationToNextHalfHour 获取下个整点或半小时到当前的时差
func GetDurationToNextMinute ¶
GetDurationToNextMinute 获取当前和下一分钟的时差
func GetNextHalfHour ¶
GetNextHalfHour 获取整点和半小时 例如: 当前是19:20, 则获取到的是19:30, 如果是19:40, 获取到的是20:00
func GetProgramFileAbsPath ¶
GetProgramFileAbsPath 获取当前可执行文件绝对路径
func GetProgramFileBaseName ¶
GetProgramFileBaseName 获取当前可执行文件名(不含扩展名)
func GetProgramFileName ¶
GetProgramFileName 获取当前可执行文件名(含扩展名)
func GetTheDayBeginTime ¶
GetTheDayBeginTime 获取距离某时刻n天的开始时刻
func GetTheWeekBeginTime ¶
GetTheWeekBeginTime 获取某周周一0点0分0秒时刻
func IsSameDayUnixTimeStamp ¶
IsSameDayUnixTimeStamp 判断2个unix时间戳是不是同一天
func LowerFirst ¶
func MustGetProgramFileAbsPath ¶
func MustGetProgramFileAbsPath() string
MustGetProgramFileAbsPath 获取当前可执行文件绝对路径
func MustGetProgramFileBaseName ¶
func MustGetProgramFileBaseName() string
MustGetProgramFileBaseName 获取当前可执行文件名(不含扩展名)
func MustGetProgramFileName ¶
func MustGetProgramFileName() string
MustGetProgramFileName 获取当前可执行文件名(含扩展名)
func ParseTimeStringByFormat ¶
ParseTimeStringByFormat 解析时间字符串, 返回UTC时间
func ParseTimeStringInLocationByFormat ¶
ParseTimeStringInLocationByFormat 解析时间字符串, 返回本地时间
func ReadLineFromConsole ¶
func UpperFirst ¶
func WaitExitSignal ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.