utils

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByteToInt32

func ByteToInt32(b []byte) int32

func ByteToInt64

func ByteToInt64(b []byte) int64

func ByteToUInt32 added in v0.1.1

func ByteToUInt32(b []byte) uint32

func ByteToUInt64 added in v0.1.1

func ByteToUInt64(b []byte) uint64

func DbDir

func DbDir() string

func Encode

func Encode(d interface{}) []byte

func GetFilenameWithoutExtension

func GetFilenameWithoutExtension(filename string) string

func GetTestKey

func GetTestKey(i int) []byte

func HasTimestampExpired

func HasTimestampExpired(timestamp int64) bool

func Int32ToByte

func Int32ToByte(n int32) []byte

func Int64ToByte

func Int64ToByte(n int64) []byte

func JoinPaths

func JoinPaths(pathA, pathB string) string

func RandomValue

func RandomValue(n int) []byte

func ReadFile

func ReadFile(path string) ([]byte, error)

func Recover

func Recover()

func StringToInt

func StringToInt(s []byte) (int, error)

func TimeUntilUnixNano

func TimeUntilUnixNano(tstamp int64) time.Duration

func UInt32ToByte added in v0.1.1

func UInt32ToByte(n uint32) []byte

func UInt64ToByte added in v0.1.1

func UInt64ToByte(n uint64) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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