util

package
v0.0.0-...-831e56b Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PackStruct

func PackStruct(buf io.Writer, data interface{}) error

PackStruct will reflect over the given pointer and write the fields to the buffer in the order of declaration. This function uses BigEndian encoding.

func RandomString

func RandomString(length int) string

RandomString returns a randomly generated string of the given length.

func Write

func Write(buf io.Writer, v interface{}) error

Write is a convenience wrapper for using the binary package to write to a buffer.

Types

This section is empty.

Jump to

Keyboard shortcuts

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