Documentation ¶
Index ¶
- Constants
- Variables
- func Clone(src, dst interface{}) error
- func Compress(b []byte) []byte
- func Expand(b []byte) []byte
- func PaddedAppend(size uint, src []byte) []byte
- func PrettyPrintJson(b []byte) []byte
- func RandString(ulen uint8) string
- func Rcopy(dst []byte, src []byte) int
- func String(b []byte) string
- func Uint64ToBytes(i uint64) []byte
Constants ¶
View Source
const ( OpAdd = 0 OpDel = 1 OpUpt = 2 )
View Source
const MaxUint64 uint64 = 18446744073709551615
Variables ¶
View Source
var ( Big1 = big.NewInt(1) Big2 = big.NewInt(2) Big3 = big.NewInt(3) Big0 = big.NewInt(0) Big32 = big.NewInt(32) Big256 = big.NewInt(256) Big257 = big.NewInt(257) )
Common big integers often used
Functions ¶
func PaddedAppend ¶
PaddedAppend appends the src byte slice to dst, returning the new slice. If the length of the source is smaller than the passed size, leading zero bytes are appended to the dst slice before appending src.
func PrettyPrintJson ¶
func RandString ¶
func Uint64ToBytes ¶
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Package bitutil implements fast bitwise operations.
|
Package bitutil implements fast bitwise operations. |
Package hexutil implements hex encoding with 0x prefix.
|
Package hexutil implements hex encoding with 0x prefix. |
Package math provides integer math utilities.
|
Package math provides integer math utilities. |
Package common contains various helper functions.
|
Package common contains various helper functions. |
Click to show internal directories.
Click to hide internal directories.