helpers

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: MIT Imports: 15 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(a1, a2 int) int

func DateFormat

func DateFormat(date time.Time, layout string) string

DateFormat 格式化时间

func Decrypt

func Decrypt(ciphertext, key []byte) ([]byte, error)

func Encrypt

func Encrypt(plaintext, key []byte) ([]byte, error)

func GetCurrentDirectory added in v0.0.2

func GetCurrentDirectory() string

func GetCurrentTime

func GetCurrentTime() time.Time

func IsEven

func IsEven(number int) bool

IsEven 判断数字是否是偶数

func IsOdd

func IsOdd(number int) bool

IsOdd 判断数字是否是奇数

func Len added in v0.0.2

func Len(s string) int

func ListTag

func ListTag() string

func Md5

func Md5(source string) string

Md5 计算字符串的md5值

func Minus

func Minus(a1, a2 int) int

func PathExists

func PathExists(path string) (bool, error)

func SendToMail

func SendToMail(user, password, host, to, subject, body, mailType string) error

func Substring

func Substring(source string, start, end int) string

Substring 截取字符串

func Truncate

func Truncate(s string, n int) string

func UUID

func UUID() string

Types

This section is empty.

Jump to

Keyboard shortcuts

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