Documentation ¶
Index ¶
- func AnyToStr(obj interface{}) string
- func Base64Decode(s string) (string, error)
- func Base64DecodeBytes(s []byte) (result []byte, err error)
- func Base64Encode(s string) (result string)
- func Base64EncodeBytes(s []byte) (result []byte)
- func BytesToString(b []byte) string
- func BytesToStruct(bytes []byte, obj interface{}) error
- func GZipBytes(data []byte) ([]byte, error)
- func GetType(val interface{}) reflect.Type
- func GetTypeFullName(val interface{}) (string, string, string)
- func GetTypeName(val interface{}) string
- func IfElseInt(condition bool, valt int, valf int) int
- func IndexOf(ary []string, str string, isMatchCase bool) (index int)
- func IndexOfMatchCase(ary []string, str string) (index int)
- func IndexOfWithoutCase(ary []string, str string) (index int)
- func Int64Max(x, y int64) int64
- func Int64Min(x, y int64) int64
- func IntMax(x, y int) int
- func IntMin(x, y int) int
- func IsDirExists(path string) (bool, error)
- func IsObjectNil(obj interface{}) bool
- func IsStrEmptyOrNull(str string) bool
- func Md5(s string) (result string)
- func Md5Bytes(p []byte) (result string)
- func Sha1(s string) (result string)
- func Sha1Bytes(p []byte) (result string)
- func Sha256(s string) (result string)
- func Sha256Bytes(p []byte) (result string)
- func Sha512(s string) (result string)
- func Sha512Bytes(p []byte) (result string)
- func StringToBytes(s string) []byte
- func StructToBytes(obj interface{}) ([]byte, error)
- func UGZipBytes(data []byte) ([]byte, error)
- func UZipBytes(data []byte) ([]byte, error)
- func ZipBytes(data []byte) ([]byte, error)
- type Closer
- type XTime
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnyToStr ¶
func AnyToStr(obj interface{}) string
任意类型转成字符串
Example ¶
var u1 uInt = 9845 var f chan int fmt.Println(AnyToStr(u1)) fmt.Println(AnyToStr(f))
Output: 9845 chan int
func Base64Decode ¶ added in v1.1.3
func Base64DecodeBytes ¶ added in v1.1.3
func Base64Encode ¶ added in v1.1.3
func Base64EncodeBytes ¶ added in v1.1.3
func BytesToStruct ¶
func GetTypeFullName ¶
func GetTypeName ¶
func GetTypeName(val interface{}) string
func Sha256Bytes ¶ added in v1.1.3
func Sha512Bytes ¶ added in v1.1.3
func StructToBytes ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.