Help us shape the future of Go! Take the 2026 Go Developer Survey

varbin

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2026 License: GPL-2.0 Imports: 10 Imported by: 37

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Read deprecated

func Read(r io.Reader, order binary.ByteOrder, rawData any) error

Deprecated: not well-designed. Use manual serialization or JSON/gRPC instead.

func ReadSlice added in v0.8.13

func ReadSlice[T BaseData](reader Reader, order binary.ByteOrder) ([]T, error)

func ReadSliceCount added in v0.8.13

func ReadSliceCount[T BaseData](reader Reader, order binary.ByteOrder, count uint64) ([]T, error)

func ReadValue deprecated

func ReadValue[T any](r io.Reader, order binary.ByteOrder) (T, error)

Deprecated: not well-designed. Use manual serialization or JSON/gRPC instead.

func UvarintLen

func UvarintLen(x uint64) int

func Write deprecated

func Write(w io.Writer, order binary.ByteOrder, rawData any) error

Deprecated: not well-designed. Use manual serialization or JSON/gRPC instead.

func WriteUvarint

func WriteUvarint(writer io.ByteWriter, value uint64) (int, error)

Types

type BaseData added in v0.8.13

type BaseData interface {
	~bool | ~int8 | ~uint8 | ~int16 | ~uint16 | ~int32 | ~uint32 | ~int64 | ~uint64 | ~float32 | ~float64
}

type Reader

type Reader interface {
	io.Reader
	io.ByteReader
}

func StubReader

func StubReader(reader io.Reader) Reader

type Writer

type Writer interface {
	io.Writer
	io.ByteWriter
}

Jump to

Keyboard shortcuts

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