util

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Min

func Min(a, b int) int

Min int

func PutWriter

func PutWriter(target io.Writer, b []byte) error

PutWriter writes all content from b to target

Types

type BufWriter

type BufWriter struct {
	// contains filtered or unexported fields
}

BufWriter is byte slice buffer that implements io.WriteSeeker

func (*BufWriter) Bytes

func (m *BufWriter) Bytes() []byte

Bytes return a copy of the internal byte slice

func (*BufWriter) Len

func (m *BufWriter) Len() int

Len returns the length of the internal byte slice

func (*BufWriter) Seek

func (m *BufWriter) Seek(offset int64, whence int) (int64, error)

Seek to a position on the byte slice

func (*BufWriter) Write

func (m *BufWriter) Write(p []byte) (n int, err error)

Write the contents of p and return the bytes written

Jump to

Keyboard shortcuts

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