utils

package
v0.0.0-...-9d2f815 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareHashAndPassword

func CompareHashAndPassword(hashPassword, password string) bool

func DiffDays

func DiffDays(t time.Time) int

func DiffForHumans

func DiffForHumans(t *time.Time) string

DiffForHumans 格式化时间

func GenerateFromPassword

func GenerateFromPassword(password string) string

func GlobalFunc

func GlobalFunc() template.FuncMap

func Html

func Html(s string) template.HTML

Html 解析 HTML

func Limit

func Limit(s string, start, length int, append string) string

Limit 将字符串以指定长度进行截断

func Md5

func Md5(str string) string

func RemindName

func RemindName(a string) string

RemindName 提醒名

func ResolvePathFileName

func ResolvePathFileName(path string) string

func Substr

func Substr(s string, start, length int) string

Substr 截取字符串

func ToDateString

func ToDateString(t time.Time) string

func ToDateTimeString

func ToDateTimeString(t time.Time) string

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