utils

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHostname

func GetHostname() string

func GetInterfaceString

func GetInterfaceString(param interface{}) string

func GoWithRecover

func GoWithRecover(handler func(), recoverHandler func(r interface{}))

func InArray

func InArray(in string, array []string) bool

Types

type Reader

type Reader struct {
	Buffer        []byte
	ReadPosition  int
	WritePosition int
	// contains filtered or unexported fields
}

func NewReader

func NewReader(reader io.Reader) *Reader

func (*Reader) GetNbytes

func (r *Reader) GetNbytes(num int) (data []byte, err error)

func (*Reader) IsEnd

func (r *Reader) IsEnd() (ret bool)

func (*Reader) ReadSome

func (r *Reader) ReadSome(min int) error

func (*Reader) RequireNBytes

func (r *Reader) RequireNBytes(num int) error

func (*Reader) Reset

func (r *Reader) Reset()

Jump to

Keyboard shortcuts

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