Documentation
¶
Index ¶
- Constants
- Variables
- func AbsInt64(n int64) int64
- func BeginningOfMonth(t time.Time) time.Time
- func CalcCurrentTimeGap(d string) (time.Time, error)
- func CheckFileExist(filePath string) (exist bool)
- func CheckPathExist(path string) bool
- func ConcatBytes(arr ...[]byte) []byte
- func ConcatStrings(arr ...[]string) []string
- func CreateDirPath(dirPath string) error
- func CreateFilePath(filePath string) error
- func CurrentMilliseconds() int64
- func CurrentTime() string
- func Decrypt(raw string, hashPassword string) int
- func Encrypt(key string) string
- func EncryptWithSalt(key string, salt string) string
- func EndOfMonth(t time.Time) time.Time
- func GBK2UTF8(s []byte) (string, error)
- func GenUUID() string
- func GetEnvInt(key string) int
- func GetEnvString(key string) string
- func GetInternalIPAddress() (string, error)
- func IndexOfInt32(s []int32, d int32) int
- func IndexOfString(s []string, substr string) int
- func InitDevLog(debug bool, logFile string) *zap.Logger
- func InitLog(conf *conf.MyConfig) *zap.Logger
- func InitRotateLog(conf *conf.MyConfig) *zap.Logger
- func InitStructFromEnv(i interface{}) reflect.Value
- func MD5(s string) string
- func MD5Byte(b []byte) string
- func Max(x, y int64) int64
- func MaxInt(x, y int) int
- func MaxInt32(x, y int32) int32
- func Min(x, y int64) int64
- func MinInt(x, y int) int
- func MinInt32(x, y int32) int32
- func PrintEnvKey(i interface{})
- func RandString(n int) string
- func ToDateTimeString(i interface{}, s string) string
- func UTF82GBK(s string) ([]byte, error)
Constants ¶
View Source
const NanoGap = 1000 * 1000
NanoGap export
Variables ¶
View Source
var ErrorCannotSet = errors.New("can not set")
Functions ¶
func CalcCurrentTimeGap ¶
CalcCurrentTimeGap d = duration string
func EncryptWithSalt ¶
EncryptWithSalt key with salt return [salt]$[hash]
func IndexOfString ¶
IndexOfString for slice string find substr
func InitDevLog ¶ added in v1.0.14
InitDevLog in global
func InitStructFromEnv ¶ added in v0.1.12
InitStructFromEnv by reflect i interface{} = struct instance support Kind: String Int Int32 Int64 Bool Float32 Float64 Slice of string
func PrintEnvKey ¶ added in v0.1.12
func PrintEnvKey(i interface{})
PrintEnvKey show struct field from env key
func ToDateTimeString ¶
ToDateTimeString TL;DR
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.