package
3.0.0+incompatible
Repository: https://github.com/nebulasio/go-nebulas.git
Documentation: pkg.go.dev
# README
utils
Src of utilities, helper functions.
# Functions
CreateDirIfNotExist create dir.
FileExists check file exists.
FileWrite write file to path.
NewUint128 returns a new Uint128 struct with default value.
NewUint128FromBigInt returns a new Uint128 struct with given value and have a check.
NewUint128FromFixedSizeBytes returns a new Uint128 struct with given fixed size byte array.
NewUint128FromFixedSizeByteSlice returns a new Uint128 struct with given fixed size byte slice.
NewUint128FromInt returns a new Uint128 struct with given value and have a check.
NewUint128FromString returns a new Uint128 struct with given value and have a check.
NewUint128FromUint returns a new Uint128 with given value.
Uint128Zero zero of uint128.
# Constants
Uint128Bits defines the number of bits for Uint128 type.
Uint128Bytes defines the number of bytes for Uint128 type.
# Variables
ErrFileExists file exists.
ErrUint128InvalidBytesSize indicates the bytes size is not equal to Uint128Bytes.
ErrUint128InvalidString indicates the string is not valid when converted to uin128.
ErrUint128Overflow indicates the value is greater than uint128 maximum value 2^128.
ErrUint128Underflow indicates the value is smaller then uint128 minimum value 0.