Documentation ¶
Overview ¶
Useful routines used in several other packages.
Index ¶
- func AddInt64(a, b int64) (int64, error)
- func AddUint64(a, b uint64) (uint64, error)
- func CleanTemporaryDirs(dirs []string) error
- func Dup(b []byte) []byte
- func EnsureTimeout(tm tm, expected uint64)
- func FromBase58JSON(value []byte, size int, name string) ([]byte, error)
- func FromBase58JSONUnsized(value []byte, name string) ([]byte, error)
- func FromBase64JSONUnsized(value []byte, name string) ([]byte, error)
- func GetStatePath() (string, error)
- func ParseDuration(str string) (seconds, error)
- func ReplaceInvalidUtf8Chars(s string) string
- func SetMaxOpenFiles(limit uint64) error
- func SetupLogger(level string) (*zap.Logger, *zap.SugaredLogger)
- func TimestampMillisToTime(ts uint64) time.Time
- func ToBase58JSON(b []byte) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanTemporaryDirs ¶
func EnsureTimeout ¶ added in v0.8.0
func EnsureTimeout(tm tm, expected uint64)
no way when expected can be higher than current, but if somehow its happened...
func FromBase64JSONUnsized ¶ added in v0.6.0
func GetStatePath ¶
func ParseDuration ¶
func ReplaceInvalidUtf8Chars ¶ added in v0.8.0
Replaces invalid utf8 characters with '?'.
func SetMaxOpenFiles ¶ added in v0.8.0
func SetupLogger ¶
func SetupLogger(level string) (*zap.Logger, *zap.SugaredLogger)
func TimestampMillisToTime ¶ added in v0.8.0
func ToBase58JSON ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.