utils

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2015 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckSign

func CheckSign(token, sign, privateKey string) error

func ClientIp

func ClientIp(r *http.Request) string

func Compress

func Compress(path string, spath string) error

func DelEmptySlice

func DelEmptySlice(arr []string) []string

func GenSign

func GenSign(privateKey string) (string, string)

func HttpGet

func HttpGet(url string, ttl int) ([]byte, error)

func Md5

func Md5(s string) string

func Mkdir

func Mkdir(args ...string) error

func RandInt

func RandInt(min int, max int) int

func RunCmd

func RunCmd(path, cmd string) error

func SignPassword

func SignPassword(password string, id int) string

func UUID

func UUID() (string, error)

func Unzip

func Unzip(path, file string) error

func UnzipToFolder

func UnzipToFolder(path, file, folder string) error

Types

type StringReverse

type StringReverse []string

func (StringReverse) Len

func (s StringReverse) Len() int

func (StringReverse) Less

func (s StringReverse) Less(i, j int) bool

func (StringReverse) Swap

func (s StringReverse) Swap(i, j int)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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