Documentation
¶
Index ¶
- Constants
- func Base64Decode(data string) string
- func Base64Encode(data string) string
- func CamelName(name string) string
- func ConvertString(inter interface{}, precs ...int) string
- func GenSign(args url.Values, secretKey string) string
- func Gunzip(r io.Reader) ([]byte, error)
- func Gzip(b []byte, w io.Writer) (int, error)
- func Ip2long(ipstr string) uint32
- func Md5(text string) string
- func Md5Buf(buf []byte) string
- func Md5File(reader io.Reader) string
- func MustBool(s string, defaultVal ...bool) bool
- func MustFloat(inter interface{}, defaultVals ...float64) float64
- func MustInt(s string, defaultVal ...int) int
- func MustInt64(s string, defaultVal ...int64) int64
- func RandString(n int, defaultCharsets ...string) string
- func RemoteIp(req *http.Request) string
- func SearchString(slice []string, s string) int
- func UnderscoreName(name string) string
- type Buffer
Constants ¶
View Source
const ( XForwardedFor = "X-Forwarded-For" XRealIP = "X-Real-IP" )
View Source
const DefaultCharset = randutil.Alphanumeric + "!%@#"
Variables ¶
This section is empty.
Functions ¶
func Base64Decode ¶
func Base64Encode ¶
func ConvertString ¶
func RandString ¶
RandString 产生随机字符串,可用于密码等
func SearchString ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.