utility

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StdLen  = 16
	UUIDLen = 20
)

Variables

View Source
var StdChars = []byte("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")

Functions

func AjaxPageList

func AjaxPageList(count, pageCount, takeNum, pageIndex int) string

func FilterSQL

func FilterSQL(sql string) string

防sql注入处理

func GetRequestInt

func GetRequestInt(r *http.Request, key string) int

func GetRequestStr

func GetRequestStr(r *http.Request, key string) string

func If

func If(b bool, t, f interface{}) interface{}

func JsonDecode

func JsonDecode(json string) string

func JsonEncode

func JsonEncode(json string) string

func MD5

func MD5(data string) string

func New

func New() string

func NewGuid

func NewGuid() string

func NewLen

func NewLen(length int) string

func NewLenChars

func NewLenChars(length int, chars []byte) string

func NoHTML

func NoHTML(htmlstring string) string

func SHA1

func SHA1(data string) string

func SubString

func SubString(str string, begin, length int) (substr string)

func ToDBC

func ToDBC(input string) string

全角转半角

func ToInt

func ToInt(obj interface{}) int

func ToSBC

func ToSBC(input string) string

半角转全角

func ToStr

func ToStr(obj interface{}) string

func VerifyCode

func VerifyCode(w http.ResponseWriter) (string, []byte)

Types

type Image

type Image struct {
	*image.NRGBA
	// contains filtered or unexported fields
}

func NewImage

func NewImage(digits []byte, width, height int) *Image

Jump to

Keyboard shortcuts

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