Documentation ¶
Index ¶
- func Base64Decode(s string) string
- func Base64Encode(s string) string
- func BasePath() string
- func BytesToString(b []byte) string
- func CompareVersion(ver, cVer string) int
- func CurrentPath() string
- func FileExt(file string) string
- func FmtPageParams(pageNum, pageSize int64) (int64, int64)
- func GetLocalIP() (ipv4 string, err error)
- func GetRequestIp(r *http.Request) string
- func InStringArray(s string, arr []string) bool
- func Interface2Float64(d interface{}) float64
- func Interface2Int64(d interface{}) int64
- func InterfaceToSqlString(a interface{}) string
- func IsExistPath(path string) bool
- func Md5Sum(s string) string
- func NewMd5Password(password string, secret string) string
- func NewRequestId() string
- func RandCode(l int, chars []string) string
- func RandFigureCode(l int) string
- func RandLetterCode(l int) string
- func RandLetterFigureCode(l int) string
- func ReadYaml(data interface{}, yamlContent string) error
- func ReadYamlFile(data interface{}, configPath string) error
- func ScanEmbedFsDo(embFs embed.FS, fn func(file string, path string) error) error
- func ScopeCreateSQLv1916(scope *gorm.Scope)
- func StringToBytes(s string) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Base64Decode ¶ added in v1.1.10
func Base64Encode ¶ added in v1.1.10
func BytesToString ¶ added in v1.1.43
BytesToString converts byte slice to string without a memory allocation.
func CompareVersion ¶ added in v1.1.7
CompareVersion 比较版本,-1:小于,0:相等,1:大于 v1.1.1 compare v1.2.1
func FmtPageParams ¶ added in v1.1.7
func GetRequestIp ¶ added in v1.1.7
returns request real ip.
func InStringArray ¶ added in v1.1.9
func Interface2Float64 ¶ added in v1.1.43
func Interface2Float64(d interface{}) float64
Interface2Float64 任意值转float64
func Interface2Int64 ¶ added in v1.1.19
func Interface2Int64(d interface{}) int64
Interface2Int64 任意值转int64
func InterfaceToSqlString ¶ added in v1.1.43
func InterfaceToSqlString(a interface{}) string
func NewMd5Password ¶ added in v1.1.7
func NewRequestId ¶
func NewRequestId() string
func RandFigureCode ¶ added in v1.1.8
func RandLetterCode ¶ added in v1.1.8
func RandLetterFigureCode ¶ added in v1.1.8
func ReadYamlFile ¶ added in v1.1.7
func ScanEmbedFsDo ¶ added in v1.1.43
ScanEmbedFsDo 扫描文件操作
func ScopeCreateSQLv1916 ¶ added in v1.1.43
ScopeCreateSQLv1916 为scope生成create sql和vars(适用于gorm v1.9.16版本) 无法用于map
scope := db.NewScope(value) scope.Set("gorm:insert_option", "ON CONFLICT(id) DO NOTHING") ScopeCreateSQLv1916(scope) scope.SQL, scope.SQLVars
func StringToBytes ¶ added in v1.1.43
StringToBytes converts string to byte slice without a memory allocation.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.