Documentation
¶
Index ¶
- Variables
- func Abs[V kind.Number](value V) V
- func Acquire(lock *int64, timeout time.Duration) (token int64)
- func Base64Decode(src []byte) (dst []byte, err error)
- func Base64Decode2String(src []byte) (data string, err error)
- func Base64Encode(src []byte) []byte
- func Base64Encode2String(src []byte) string
- func Base64UrlDecode(src []byte) (dst []byte, err error)
- func Base64UrlEncode(src []byte) []byte
- func BinPath() string
- func Black(format string, args ...any)
- func Blue(format string, args ...any)
- func Bytes2Bool(data []byte) bool
- func Bytes2Float64(data []byte) float64
- func Bytes2Int64(data []byte) int64
- func Bytes2String(data []byte) string
- func Bytes2Uint32(data []byte) uint32
- func Bytes2Uint64(data []byte) uint64
- func FileExists(fileName string) (exists bool, err error)
- func FileTime(fileName string) (createTime, lastAccessTime, lastWriteTime int64, err error)
- func Fuchsia(format string, args ...any)
- func Green(format string, args ...any)
- func HMac(key []byte, data []byte, hash crypto.Hash) string
- func HMacBytes(key []byte, data []byte, hash crypto.Hash) []byte
- func Hash(data []byte, hash crypto.Hash) string
- func HashBytes(data []byte, hash crypto.Hash) []byte
- func HashValue(key any) uint32
- func HexDecode(src []byte) (dst []byte, err error)
- func HexDecode2String(src []byte) (data string, err error)
- func HexEncode(src []byte) []byte
- func HexEncode2String(src []byte) string
- func Index4Bit(key any, bitCount uint8) uint32
- func Index4Int16(key any) int16
- func Index4Int8(key any) int8
- func Index4Uint8(key any) uint8
- func Ip2Long(ip string) (ipVal uint32, err error)
- func Join[T kind.Integer](sep string, elems ...T) string
- func JsonDecode(data string, v any) (err error)
- func JsonEncode(v any) (data string, err error)
- func JsonUnmarshalFile(filePath string, v any) (err error)
- func LcFirst(str string) string
- func LocalIp() (ip string, err error)
- func Long2Ip(ipVal uint32) string
- func Md5(data []byte) string
- func MkDir(dir string, perm os.FileMode) (err error)
- func ParallelLoad(loadList ...func() error)
- func PprofIsRun() bool
- func Recover(eventName string, f func(args ...any), args ...any)
- func Red(format string, args ...any)
- func RedFatal(format string, args ...any)
- func Release(lock *int64, token int64) (swapped bool)
- func Sha1(data []byte) string
- func Sha256(data []byte) string
- func StartPprof(addr string, handler http.Handler) error
- func StopPprof(ctx context.Context) error
- func StopPprofWithTimeout(seconds int64) error
- func String2Bytes(data string) []byte
- func StringInteger[T kind.Integer](value T) string
- func Timeout(timeout time.Duration, handler func(args ...any), args ...any) error
- func ToString(val any) string
- func UcFirst(str string) string
- func YamlDecode(data string, v any) (err error)
- func YamlEncode(v any) (data string, err error)
- func YamlUnmarshalFile(filePath string, v any) (err error)
- func Yellow(format string, args ...any)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrIpV4Address = errors.New(`invalid ip v4 address`) ErrNotFoundIp = errors.New("not found ip address") )
View Source
var ( JsonMarshal = json.Marshal JsonUnmarshal = json.Unmarshal )
View Source
var ( YamlMarshal = yaml.Marshal YamlUnmarshal = yaml.Unmarshal )
Functions ¶
func Base64Decode ¶
func Base64Decode2String ¶
func Base64Encode ¶
func Base64Encode2String ¶
func Base64UrlDecode ¶
func Base64UrlEncode ¶
func HexDecode2String ¶
func HexEncode2String ¶
func JsonUnmarshalFile ¶
JsonUnmarshalFile ---
func ParallelLoad ¶
func ParallelLoad(loadList ...func() error)
func StringInteger ¶
func YamlUnmarshalFile ¶
YamlUnmarshalFile ---
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.