util

package
v0.0.0-...-5f88e8a Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2020 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AvatarResize

func AvatarResize(srcImg image.Image, w, h int, filePath string) error

func CheckImageType

func CheckImageType(buff []byte) string

func CheckTags

func CheckTags(tags string) string

func ContentFmt

func ContentFmt(db *youdb.DB, input string) string

文本格式化

func ContentRich

func ContentRich(db *youdb.DB, input string) string

func FetchAvatar

func FetchAvatar(url, save, ua string) error

func GetImageObj

func GetImageObj(buff *bytes.Buffer) (image.Image, error)

func GetImageObj2

func GetImageObj2(buff *bytes.Buffer) (image.Image, error)

func GetMention

func GetMention(input string, notInclude []string) []string

func HashFileMD5

func HashFileMD5(filePath string) (string, error)

func ImageResize

func ImageResize(srcImg image.Image, w, h int) *image.NRGBA

func IsMail

func IsMail(str string) bool

func IsNickname

func IsNickname(str string) bool

func IsUserName

func IsUserName(str string) bool

func RemoveCharacter

func RemoveCharacter(str string) string

func SliceUniqInt

func SliceUniqInt(s []int) []int

func SliceUniqStr

func SliceUniqStr(s []string) []string

func TimeFmt

func TimeFmt(tp interface{}, sample string, tz int) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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