Documentation
¶
Index ¶
- func AppendFile(filename string, output []byte) error
- func Base64Decode(str string) string
- func Compress(files []*os.File, dest string) error
- func CreateFile(filePath string) error
- func CreateTemFile(name string, file multipart.File) (string, error)
- func GetRandomString(n int) string
- func HashPassword(pwd string) string
- func IsExist(path string) bool
- func IsTestEnv() bool
- func ParseFlostToString(f float64) string
- func ParseInt(b string, defInt int) int
- func ParseString(b int) string
- func StructToMap(obj interface{}) map[string]interface{}
- func StructToString(data interface{}) string
- func SubString(str string, start, length int) string
- func TimeFormat(time *time.Time) string
- func WriteFile(filename string, output []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendFile ¶
AppendFile writes the contents of the output buffer to a file
func Base64Decode ¶
*
- base64 解码
- @method func
- @param {[type]} t *Tools [description]
- @return {[type]} [description]
func HashPassword ¶
func ParseFlostToString ¶
*
- 转换浮点数为string
- @method func
- @param {[type]} t * Tools [description]
- @return {[type]} [description]
func ParseInt ¶
*
- string转换int
- @method parseInt
- @param {[type]} b string [description]
- @return {[type]} [description]
func ParseString ¶
*
- int转换string
- @method parseInt
- @param {[type]} b string [description]
- @return {[type]} [description]
func StructToMap ¶
func StructToMap(obj interface{}) map[string]interface{}
*
- 结构体转换成map对象
- @method func
- @param {[type]} t *Tools [description]
- @return {[type]} [description]
func StructToString ¶
func StructToString(data interface{}) string
*
- 结构体转成json 字符串
- @method StruckToString
- @param {[type]} data interface{} [description]
func SubString ¶
*
- 字符串截取
- @method func
- @param {[type]} t *Tools [description]
- @return {[type]} [description]
func TimeFormat ¶
*
- 时间格式化
- @method func
- @param {[type]} t *Tools [description]
- @return {[type]} [description]
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.