util

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base64

func Base64(params string) string

先base64,然后MD5

func Base64Bytes

func Base64Bytes(bytes []byte) string

先base64,然后MD5

func Base64MD5

func Base64MD5(params string) string

先base64,然后MD5

func Capitalize

func Capitalize(str string) string

字符首字母大写转换

func ConditionString

func ConditionString(condition bool, f1 interface{}, f2 interface{}) string

func Contains

func Contains(container interface{}, obj interface{}) (bool, error)

func ContainsAll

func ContainsAll(container interface{}, objs []interface{}) (bool, error)

func ContainsAny

func ContainsAny(container interface{}, objs []interface{}) (bool, error)

func CopyFields

func CopyFields(dest interface{}, src interface{}, fields ...string) (err error)

按名字和类型复制(&a,b)b->a

func CopyFieldsExcept

func CopyFieldsExcept(dest interface{}, src interface{}, fields ...string) (err error)

按名字和类型复制(&a,b)b->a

func CreateSqlResFormatFactory

func CreateSqlResFormatFactory() *sqlResFormatTree

func DefaultString

func DefaultString(s string, defaultValue string) string

func DeleteElement

func DeleteElement(src []string, elem string) []string

func DeleteElements

func DeleteElements(src []string, elems []string) []string

func Filter

func Filter(container interface{}, objs []interface{}) (interface{}, error)

func GenerateRandomString

func GenerateRandomString(length int) string

func Int32Addr

func Int32Addr(i int32) *int32

func Int64Addr

func Int64Addr(i int64) *int64

func IntAddr

func IntAddr(i int) *int

func MD5

func MD5(params string) string

func MapStruct

func MapStruct(src map[string]interface{}, dest interface{})

func NotNullString

func NotNullString(s *string) string

func RemoveRepByMap

func RemoveRepByMap(slc []string) []string

func SHA1

func SHA1(data string) string

func StringAddr

func StringAddr(s string) *string

func StringValue

func StringValue(s *string) string

func SubString

func SubString(str string, begin, length int) string

func TimeAddr

func TimeAddr(t time.Time) *time.Time

func TimeValue

func TimeValue(t *time.Time) time.Time

func UUID

func UUID() string

func Unzip

func Unzip(zipFile string, destDir string) ([]string, error)

解压

func ZipFiles

func ZipFiles(filename string, files []string, oldForm, newForm string) error

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