utils

package
v0.0.0-...-e6aaabb Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(slice []string, sub string) bool

Contains slice contain sub

func Encrypt

func Encrypt(data string, salt string) (string, error)

Encrypt is encrypt the data with salt

func FormatDate

func FormatDate(t time.Time) string

FormatDate 格式化时间

func LoadTemplates

func LoadTemplates(templatesDir string) multitemplate.Render

LoadTemplates 加载资源文件

func NewStore

func NewStore(cookieStore *sessions.CookieStore) ginsessions.Store

func RandomString

func RandomString(length int) string

RandomString generate random string

func StructToMap

func StructToMap(inter interface{}) map[string]interface{}

StructToMap will change struct to map

Types

This section is empty.

Jump to

Keyboard shortcuts

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