util

package
v0.0.0-...-3d85bc3 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2016 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assert

func Assert(ok bool, pat string, args ...interface{})

func CRC

func CRC(data []byte) uint32

func EqualUDPAddr

func EqualUDPAddr(a, b *net.UDPAddr) bool

func Min

func Min(a, b uint64) uint64

func MustMarshalProto

func MustMarshalProto(msg proto.Message) []byte

func MustUnmarshalProto

func MustUnmarshalProto(data []byte, msg proto.Message)

func PackData

func PackData(msg proto.Message) []byte

func UnpackData

func UnpackData(data []byte, msg proto.Message) error

func WithLock

func WithLock(x sync.Locker, fn func() error) error

Types

type ByVersion

type ByVersion []string

func (ByVersion) Len

func (x ByVersion) Len() int

func (ByVersion) Less

func (x ByVersion) Less(i, j int) bool

func (ByVersion) Swap

func (x ByVersion) Swap(i, j int)

Jump to

Keyboard shortcuts

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