utility

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2019 License: MIT Imports: 10 Imported by: 0

README

utility

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GlobalRand1 = rand.New(rand.NewSource(int64(time.Now().Nanosecond())))
View Source
var GlobalRand2 = rand.New(rand.NewSource(int64(time.Now().Unix())))

Functions

func AppendInt

func AppendInt(buf []byte, u uint64) []byte

func Bool added in v0.0.2

func Bool(value interface{}) bool

func Bytes added in v0.0.2

func Bytes(value interface{}) []byte

func DecodeInt

func DecodeInt(buf []byte) uint64

func DecryptAes added in v0.0.2

func DecryptAes(crypted string, key []byte, iv []byte) string

func EncodeInt

func EncodeInt(u uint64) []byte

func EncryptAes added in v0.0.2

func EncryptAes(origData string, key []byte, iv []byte) string

func FixUpperCase added in v0.0.2

func FixUpperCase(data []byte)

func Float added in v0.0.2

func Float(value interface{}) float32

func Float64 added in v0.0.2

func Float64(value interface{}) float64

func Floats added in v0.0.2

func Floats(value interface{}) []float64

func If added in v0.0.2

func If(i bool, a, b interface{}) interface{}

func Int added in v0.0.2

func Int(value interface{}) int

func Int64 added in v0.0.2

func Int64(value interface{}) int64

func Ints added in v0.0.2

func Ints(value interface{}) []int64

func NewIntEncoder

func NewIntEncoder(digits string) (*intEncoder, error)

func String added in v0.0.2

func String(value interface{}) string

func StringIf added in v0.0.2

func StringIf(i bool, a, b string) string

func Strings added in v0.0.2

func Strings(value interface{}) []string

func Switch added in v0.0.2

func Switch(i uint, args ...interface{}) interface{}

func UniqueId

func UniqueId() string

Types

This section is empty.

Jump to

Keyboard shortcuts

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