Versions in this module Expand all Collapse all v1 v1.3.1 Sep 5, 2021 v1.3.0 Aug 9, 2021 Changes in this version + var DaySeconds = 24 * HourSeconds + var ErrSizeParse = errors.New("file size parse error") + var ErrTimeParse = errors.New("time parse error") + var GBytes = 1024 * MBytes + var HourSeconds = 60 * MinuteSeconds + var KBytes = 1024 + var MBytes = 1024 * KBytes + var MinuteSeconds = 60 + func CalculateBlocks(totalSize, blockSize int) (blocks int) + func GetFirstMatchedString(re *regexp.Regexp, source string) (string, bool) + func LastSubstring(s string, sep string) string + func ParseSeconds(interval string) (int, error) + func ParseSize(fileSize string) (int, error) + func ShortSourceLoc(skip int) (fileName string, line int, funcName string, ok bool) + func SourceLoc(skip int) (file string, line int, funcName string, ok bool) + func TrimBytes(bs []byte) []byte + func ZipCompress(sourceFile, archiveFile string) error + type RateLimiter struct + func NewRateLimiter(rate, intervalMillis int64) *RateLimiter + func (rl *RateLimiter) Allowable() bool