tool

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesDecrypt

func AesDecrypt(cryptedBase64 string, key []byte) ([]byte, error)

func AesEncrypt

func AesEncrypt(origData, key []byte) (string, error)

func Bytes2str

func Bytes2str(b []byte) string

func FormatFloat

func FormatFloat(value float64, decimal int) string

FormatFloat 指定浮点数精度

func Interface2Int64

func Interface2Int64(inter interface{}) int64

func Interface2String

func Interface2String(value interface{}) string

func PKCS5Padding

func PKCS5Padding(plaintext []byte, blockSize int) []byte

func PKCS5UnPadding

func PKCS5UnPadding(origData []byte) []byte

func PickDomainFromUrl

func PickDomainFromUrl(s string) (string, error)

func ReverseIntSlice

func ReverseIntSlice(s []int64) []int64

func SecondsToInt64

func SecondsToInt64(costTime float64) (int64, int64)

func StrAppend

func StrAppend(str1 string, str2 ...string) string

StrAppend 字符串拼接

func SubStr

func SubStr(s string, length int) string

func ToJson

func ToJson(val interface{}) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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