funcs

package
v0.0.0-...-d705234 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2022 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesCombine

func BytesCombine(pBytes ...[]byte) []byte

func CompareVersion

func CompareVersion(version1 string, version2 string) int

if version1 > version2 return 1; if version1 < version2 return -1; other: 0。

func Crc32

func Crc32(str string) uint32

func DesensitizeStr

func DesensitizeStr(str string) string

func FilterArrayByKeys

func FilterArrayByKeys(data []map[string]interface{}, keys []string) []map[string]interface{}

func FilterMapByKeys

func FilterMapByKeys(data map[string]interface{}, keys []string) map[string]interface{}

func GetDate

func GetDate() int32

func GetEnv

func GetEnv() string

func GetEnvVal

func GetEnvVal(key string) string

func GetMillis

func GetMillis() int64

func GetNanos

func GetNanos() int64

func GetRandString

func GetRandString(length int) string

func GetRoot

func GetRoot() string

func HasLocalIP

func HasLocalIP(ip net.IP) bool

func HasLocalIPAddr

func HasLocalIPAddr(ip string) bool

func HmacSha256

func HmacSha256(src, key string) string

func HttpBuildQuery

func HttpBuildQuery(params map[string]interface{}) (paramStr string)

func InArray

func InArray(val string, arr []interface{}) bool

func JsonDecode

func JsonDecode(data string) map[string]interface{}

func JsonEncode

func JsonEncode(data interface{}) string

func Md5

func Md5(str string) string

func Md516

func Md516(str string) string

func MergeMap

func MergeMap(x, y map[string]interface{}) map[string]interface{}

func Millis2FitTimeSpan

func Millis2FitTimeSpan(millis int) string

func PanicTrace

func PanicTrace(err interface{}) string

func RemoteIp

func RemoteIp(req *http.Request) string

func RemoveDuplicatesAndEmpty

func RemoveDuplicatesAndEmpty(arr []string) (ret []string)

func SHA1

func SHA1(s string) string

func ScanDir

func ScanDir(dirName string) ([]string, error)

func StrSha256

func StrSha256(str string) string

func StructToMap

func StructToMap(obj interface{}) map[string]interface{}

func SubSlice

func SubSlice(ori, src []string) []string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL