Documentation ¶
Index ¶
- func CurrentDateFormat(fmt string) string
- func CurrentDateTime() string
- func GetFilters() map[string]any
- func GetKey(key string) string
- func GetPinyin(txt string) string
- func HashSha(str string) string
- func Index(source string, target string) int
- func Init(startTime string, machineID int64) (err error)
- func IsEmpty(value interface{}) bool
- func Md5(str string) string
- func Must(value interface{}) bool
- func Pinyin(source string) string
- func Replace(source string, from string, to string) string
- func SnowID() int64
- func SubStr(content string, start int, end int) string
- func UnixTime(delay int, unit string) int64
- func UnixTime2Datetime(unit int64) string
- func Uuid() string
- type SSHAEncoder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CurrentDateFormat ¶
func CurrentDateTime ¶
func CurrentDateTime() string
func GetFilters ¶
func SubStr ¶
SubStr 针对负数和0 做了特殊处理 1. content[0:4] ,从开始节点到第5个字符 2. content[0:0] ,从开始节点到最后1个字符 3. content[0:-1] ,从开始节点到倒数第1个字符 3. content[-6:-1] ,从倒数第6个字符到倒数第1个字符
func UnixTime2Datetime ¶
Types ¶
type SSHAEncoder ¶
type SSHAEncoder struct { }
func (SSHAEncoder) Encode ¶
func (enc SSHAEncoder) Encode(rawPassPhrase []byte) ([]byte, error)
Encode encodes the []byte of raw password
func (SSHAEncoder) Matches ¶
func (enc SSHAEncoder) Matches(encodedPassPhrase, rawPassPhrase []byte) bool
Matches matches the encoded password and the raw password
Click to show internal directories.
Click to hide internal directories.