Documentation ¶
Index ¶
- Constants
- func AesDecrypt(ciphertext []byte, key []byte, iv []byte) ([]byte, error)
- func AesEncrypt(plaintext []byte, key []byte, iv []byte) ([]byte, error)
- func Copy(dst, src interface{}) error
- func FileExist(path string) error
- func FilesExist(path ...string) error
- func GetClientIp(r *http.Request) string
- func InSlice[T Ordered](arr []T, v T) bool
- func InSliceElem[T any](arr []T, f func(*T) bool) bool
- func Ip2Long(ipStr string) uint32
- func IsPublicIP(IP net.IP) bool
- func Join(s []string, sep string) string
- func JoinFloat[T Float](s []T, sep string, prec int) string
- func JoinInt[T Signed](s []T, sep string) string
- func JoinUint[T Unsigned](s []T, sep string) string
- func NetLong2ip(ip uint32) string
- func ParseGzip(data []byte) ([]byte, error)
- func RandInt32(min, max int32) int32
- func RandInt64(min, max int64) int64
- func RandStr(length int, chars string, mod uint) string
- func Split(s, sep string) []string
- func SplitFloat[T Float](s, sep string) ([]T, error)
- func SplitInt[T Signed](s, sep string) ([]T, error)
- func SplitUInt[T Unsigned](s, sep string) ([]T, error)
- func SubStr(str string, start int, end int) string
- func TimeFormatInLocation(tm time.Time, layout string) string
- func TimeParseInLocation(layout, value string) (time.Time, error)
- func VersionCompare(version1, version2, operator string) bool
- type Complex
- type Float
- type Integer
- type Ordered
- type Signed
- type Unsigned
Constants ¶
View Source
const ( RandStrModNumber = 0x01 RandStrModUpperCase = 0x02 RandStrModLowerCase = 0x04 )
View Source
const (
TimeFormatYear2Second = "2006-01-02 15:04:05"
)
Variables ¶
This section is empty.
Functions ¶
func FilesExist ¶
func GetClientIp ¶
func InSliceElem ¶
func IsPublicIP ¶
func NetLong2ip ¶
func SplitFloat ¶
Types ¶
type Complex ¶
type Complex interface { ~complex64 | ~complex128 }
Click to show internal directories.
Click to hide internal directories.