helpers

package
v0.0.0-...-875ef9a Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2019 License: MIT Imports: 13 Imported by: 0

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

格式化时间

func Decrypt

func Decrypt(ciphertext []byte, keystring string) ([]byte, error)

func Encrypt

func Encrypt(plaintext []byte, keystring string) ([]byte, error)

func GetCurrentTime

func GetCurrentTime() time.Time

func IsEven

func IsEven(number int) bool

判断数字是否是偶数

func IsOdd

func IsOdd(number int) bool

判断数字是否是奇数

func ListTag

func ListTag() (tagstr string)

func Md5

func Md5(source string) string

计算字符串的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

截取字符串

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