utils

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2021 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BasePath

func BasePath() string

运行的程序所在目录

func CompareVersion added in v1.1.7

func CompareVersion(ver, cVer string) int

比较版本,-1:小于,0:相等,1:大于 v1.1.1 compare v1.2.1

func CurrentPath

func CurrentPath() string

当前目录(与运行程序所在目录无关)

func FmtPageParams added in v1.1.7

func FmtPageParams(pageNum, pageSize int64) (int64, int64)

func GetLocalIP

func GetLocalIP() (ipv4 string, err error)

获取本机网卡IP

func GetRequestIp added in v1.1.7

func GetRequestIp(r *http.Request) string

func Md5Sum added in v1.1.7

func Md5Sum(s string) string

func NewMd5Password added in v1.1.7

func NewMd5Password(password string, secret string) string

func NewRequestId

func NewRequestId() string

func ReadYaml added in v1.1.7

func ReadYaml(data interface{}, yamlContent string) error

func ReadYamlFile added in v1.1.7

func ReadYamlFile(data interface{}, configPath string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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