util

package
v0.0.0-...-42d352b Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: MIT Imports: 4 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToFloat64

func BytesToFloat64(bytes []byte) float64

BytesToFloat64 converts bytes to Float64

func ConcatAddress

func ConcatAddress(address, port string) string

ConcatAddress concatonates an address and a port into an authority

func EncodeULeb128

func EncodeULeb128(value uint32) []byte

EncodeULeb128 encode's an unsigned int32 value to an unsigned LEB128 value. Returns the result in a byte slice

func PeekULeb128

func PeekULeb128(reader io.Reader) (uint32, []byte)

PeekULeb128 reads and decodes an unsigned LEB128 value from a ByteReader to an unsigned int32 value. Returns the result as a uint32, along with the data read. This is more resource intensive than ReadULeb128, and it is advised that whenever possible you should use ReadULeb128 instead.

func ReadULeb128

func ReadULeb128(reader io.Reader) (uint32, uint32)

ReadULeb128 reads and decodes an unsigned LEB128 value from a ByteReader to an unsigned int32 value. Returns the result as a uint32

func SanitizeKey

func SanitizeKey(key string) string

SanitizeKey ensures that the key does not have any trailing '/'s and starts with a '/'

Types

This section is empty.

Jump to

Keyboard shortcuts

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