utils

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CamelToSnake

func CamelToSnake(camel string) string

func CheckFileMD5

func CheckFileMD5(file *os.File, tagMd5Value string) (bool, error)

CheckFileMD5 检查文件的 md5 值

func ContainInt

func ContainInt(src []int, tag int) bool

func ContainString

func ContainString(src []string, tag string) bool

func ConvertPointer

func ConvertPointer(t reflect.Type) reflect.Type

func CreateNewFile

func CreateNewFile(path string) (*os.File, error)

CreateNewFile 创建新的文件 文件如果存在的话 会删除旧文件创建新文件并返回

func FileExist

func FileExist(filePath string) (bool, error)

func IsFunc

func IsFunc(i interface{}) bool

func IsNilPointer

func IsNilPointer(i interface{}) bool

func ParseConfig

func ParseConfig(conf string) ([]string, error)

func PasswordEncode

func PasswordEncode(password string) string

func PathNotExist added in v1.1.2

func PathNotExist(path string) (bool, error)

PathNotExist 检查路径是否不存在

func RemoveTypePtr

func RemoveTypePtr(t reflect.Type) reflect.Type

func RemoveValuePtr

func RemoveValuePtr(v reflect.Value) reflect.Value

func SnakeToCamel

func SnakeToCamel(snake string) string

func StructToMap

func StructToMap(in interface{}, omits ...string) (map[string]interface{}, error)

StructToMap 将一个结构体转换为

func UUID

func UUID() string

func Verify

func Verify(plaintext, encrypt string) bool

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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