utils

package
v0.0.0-...-bc7c564 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2020 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDirectory

func CreateDirectory(dataDir *string) error

func Deserialize

func Deserialize(struc interface{}, r io.Reader) error

func DeserializeBytes

func DeserializeBytes(reader io.Reader) (data []byte, err error)

func Ftracef

func Ftracef(w io.Writer, format string, a ...interface{})

func GetDataDir

func GetDataDir() (string, error)

func MaxInt32

func MaxInt32(a int32, b int32) int32

func MaxInt64

func MaxInt64(a int64, b int64) int64

func MaxUint32

func MaxUint32(a uint32, b uint32) uint32

func MaxUint64

func MaxUint64(a uint64, b uint64) uint64

func MinInt32

func MinInt32(a int32, b int32) int32

func MinInt64

func MinInt64(a int64, b int64) int64

func MinUint32

func MinUint32(a uint32, b uint32) uint32

func Panicf

func Panicf(format string, a ...interface{})

func Serialize

func Serialize(struc interface{}) []byte

func SerializeBytes

func SerializeBytes(data []byte) []byte

func Tracef

func Tracef(format string, a ...interface{})

Types

type BytesWithoutLengthPrefix

type BytesWithoutLengthPrefix struct {
	Bytes []byte
}

func (*BytesWithoutLengthPrefix) Deserialize

func (this *BytesWithoutLengthPrefix) Deserialize(r io.Reader) error

func (*BytesWithoutLengthPrefix) Serialize

func (this *BytesWithoutLengthPrefix) Serialize(w io.Writer) error

type Serializable

type Serializable interface {
	Serialize(io.Writer) error
	Deserialize(io.Reader) error
}

Jump to

Keyboard shortcuts

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