util

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: MIT Imports: 16 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArrayNotInArrayString

func ArrayNotInArrayString(original []string, search []string) []string

查找数组中某值是否在数组中

func CDump

func CDump(a ...interface{})

CDump 带颜色输出

func ConfGetInt

func ConfGetInt(path string) int

func ConfGetInt64

func ConfGetInt64(path string) int64

func ConfGetString

func ConfGetString(path string) string

func ConfGetStringSlice

func ConfGetStringSlice(path string) []string

func ConfGetbool

func ConfGetbool(path string) bool

func DesDecrypt

func DesDecrypt(decrypted, key string) string

解密

func DesEncrypt

func DesEncrypt(text, key string) string

DesEncrypt 加密

func Dump

func Dump(a ...interface{})

func EmojiDecode

func EmojiDecode(s string) string

EmojiDecode 表情解码

func EmojiEnCode

func EmojiEnCode(s string) string

EmojiEnCode 表情转换

func GoroutineFunc

func GoroutineFunc(fun interface{}, args ...interface{}) (err error)

func InArrayString

func InArrayString(v string, m *[]string) bool

查找某值是否在数组中

func PKCS7Padding

func PKCS7Padding(ciphertext []byte, blockSize int) []byte

func PKCS7UnPadding

func PKCS7UnPadding(origData []byte) []byte

func RandomID

func RandomID() uint64

func RandomIDInt64

func RandomIDInt64() int64

func Recover

func Recover()

用法 通常此函数放在defer 之后 ,形如: defer Recover() 通常是这样用

go func(){
    defer Recover()
    dosomething()
}()

func StringToInt

func StringToInt(str string) int

func StringToInt64

func StringToInt64(str string) int64

Types

type Encryption

type Encryption struct {
	Key []byte
}

type KeySizeError

type KeySizeError int

func (KeySizeError) Error

func (k KeySizeError) Error() string

Jump to

Keyboard shortcuts

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