Documentation ¶
Index ¶
- Variables
- func Bytes2str(b []byte) string
- func CreateDateDir(Path string) string
- func CreateDir(path string)
- func DateStringToInt(timeSting string) int64
- func EncodeMD5(value string) string
- func EnsureDir(dir string) (err error)
- func Float64(f float64, n int) float64
- func FloatAdd(x float64, y float64, more ...float64) float64
- func FloatEqual(f1, f2 float64) bool
- func FloatGreaterThan(f1, f2 float64) bool
- func FloatGreaterThanOrEqual(f1, f2 float64) bool
- func FloatLessThan(f1, f2 float64) bool
- func FloatLessThanOrEqual(f1, f2 float64) bool
- func FloatMul(x float64, y float64, more ...float64) float64
- func FloatQuo(x float64, y float64, more ...float64) float64
- func FloatSub(x float64, y float64, more ...float64) float64
- func GenerateToken(username, password string) (string, error)
- func GetCurrentPath() string
- func GetExecpath() string
- func GetFirstDateOfMonth(d time.Time) time.Time
- func GetLastDateOfMonth(d time.Time) time.Time
- func GetNum() uint8
- func GetPage(c *gin.Context) int
- func GetPath(filePath string) string
- func GetTemplatesPath(name string) string
- func GetTwoTimeDuration(startTime, endTime string) (dutarion string)
- func GetZeroTime(d time.Time) time.Time
- func Hash(str string) string
- func Md5(str string) string
- func Md5File(file multipart.File) string
- func MergeString(args ...string) string
- func NewLenChars(length int) string
- func PathExists(path string) (bool, error)
- func RangeRand(min, max int64) int64
- func RangeSplit(num int64, count int64) (res []int64)
- func Setup()
- func Str2bytes(s string) []byte
- func StrTime(timeStr string) string
- func StrToTime(str string) time.Time
- func TimeStringToInt(timeSting string) int64
- func VerifyEmailFormat(email string) bool
- func VerifyMobileFormat(mobileNum string) bool
- type Claims
Constants ¶
This section is empty.
Variables ¶
View Source
var StdChars = []byte("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")
Functions ¶
func DateStringToInt ¶
func GenerateToken ¶
GenerateToken generate tokens used for auth
func GetFirstDateOfMonth ¶
获取传入的时间所在月份的第一天,即某月第一天的0点。如传入time.Now(), 返回当前月份的第一天0点时间。
func GetLastDateOfMonth ¶
获取传入的时间所在月份的最后一天,即某月最后一天的0点。如传入time.Now(), 返回当前月份的最后一天0点时间。
func GetTwoTimeDuration ¶
获取两个时间相差时长
func MergeString ¶
* * @des 拼接字符串 * @param args ...string 要被拼接的字符串序列 * @return string
func NewLenChars ¶
func PathExists ¶
func TimeStringToInt ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.