gu

package
v0.0.0-...-f5520ae Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2022 License: Apache-2.0 Imports: 11 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPathIfNotExist

func CheckPathIfNotExist(path string) bool

CheckPathIfNotExist if file exist return true

func CreateDirIfNotExist

func CreateDirIfNotExist(dir string) error

CreateDirIfNotExist create dir recursion

func GenerateRandomNumber

func GenerateRandomNumber(maxLength int) string

GenerateRandomNumber generate random number string

func GetPtrTypeValue

func GetPtrTypeValue(obj interface{}) (objT reflect.Type, objV reflect.Value, err error)

GetPtrTypeValue returns the value of the pointer and type

func IsJSON

func IsJSON(str string) bool

IsJSON check if the data is json

func IsNil

func IsNil(v interface{}) bool

IsNil check interface is nil

func IsSlicePtr

func IsSlicePtr(t reflect.Type) bool

IsSlicePtr check if slice pointer

func IsStructPtr

func IsStructPtr(t reflect.Type) bool

IsStructPtr check if struct pointer

func ToJSONString

func ToJSONString(data interface{}) string

ToJSONString convert data to json string

func ToJSONStringEscapeHTML

func ToJSONStringEscapeHTML(data interface{}) string

ToJSONStringEscapeHTML convert data to json string escape html

func ToMD5

func ToMD5(str string) string

ToMD5 return the str's md5

func TrimStruct

func TrimStruct(obj interface{})

TrimStruct trim struct all fields

Types

This section is empty.

Jump to

Keyboard shortcuts

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