commons

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2025 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 {
	// contains filtered or unexported fields
}

func NewStream

func NewStream(bs []byte) *Stream

func NewStreamFromReadSeeker added in v1.4.0

func NewStreamFromReadSeeker(rs io.ReadSeeker) *Stream

func NewStreamFromReader added in v1.5.0

func NewStreamFromReader(reader io.Reader) *Stream

func (*Stream) CurrentIndex

func (s *Stream) CurrentIndex() int

func (*Stream) PeekN

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

func (*Stream) ReadN

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

func (*Stream) Seek

func (s *Stream) Seek(index int)

Jump to

Keyboard shortcuts

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