util

package
v0.0.0-...-7ede18c Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KC_RAND_KIND_NUM   = 0 // 纯数字
	KC_RAND_KIND_LOWER = 1 // 小写字母
	KC_RAND_KIND_UPPER = 2 // 大写字母
	KC_RAND_KIND_ALL   = 3 // 数字、大小写字母
)

Variables

This section is empty.

Functions

func BytesToInt

func BytesToInt(b []byte) int

func ContainsErr

func ContainsErr(errors ...error) bool

func HttpGet

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

func HttpPost

func HttpPost(url string, body []byte) ([]byte, error)

func IntToBytes

func IntToBytes(n int) []byte

func Krand

func Krand(size int, kind int) string

func MoreThanHalf

func MoreThanHalf(n int) int

func PendingLeft

func PendingLeft(data []byte, length int, char byte) []byte

func RandomLower

func RandomLower(size int) string

func RandomNumber

func RandomNumber(size int) string

func RandomString

func RandomString(size int) string

func RandomUpper

func RandomUpper(size int) string

func Str2Int64

func Str2Int64(str string, accuracy int) int64

func StringJoint

func StringJoint(strs ...string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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