commons

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hexify

func Hexify(data interface{}) string

func NumberToBytes

func NumberToBytes(data interface{}) []byte

Types

type Printer

type Printer struct {
	strings.Builder
	// contains filtered or unexported fields
}

func NewPrinter

func NewPrinter() *Printer

func (*Printer) DecreaseIndent

func (p *Printer) DecreaseIndent()

func (*Printer) IncreaseIndent

func (p *Printer) IncreaseIndent()

func (*Printer) Print

func (p *Printer) Print(data string)

func (*Printer) Printf

func (p *Printer) Printf(msg string, args ...interface{})

type Stream

type Stream struct {
	io.ReadSeeker
}

func NewStream

func NewStream(bs []byte) *Stream

func NewStreamFromReadSeeker added in v1.4.0

func NewStreamFromReadSeeker(rs io.ReadSeeker) *Stream

func (*Stream) CurrentIndex

func (s *Stream) CurrentIndex() int64

func (*Stream) PeekN

func (s *Stream) PeekN(n int) (bs []byte, err error)

func (*Stream) ReadN

func (s *Stream) ReadN(n int) (bs []byte, err error)

Jump to

Keyboard shortcuts

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