util

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnderflow = errors.New("underflow writing to FixedBuffer")
	ErrOverflow  = errors.New("overflow writing to FixedBuffer")
)
View Source
var (
	ErrInvalidSize  = errors.New("Creating LimitWriterAt with invalid size.")
	ErrWriteLimited = errors.New("Write was limited by LimitWriterAt.")
)

Functions

func SafeBoolFromPtr

func SafeBoolFromPtr(val *bool) bool

func SafeInt64FromPtr

func SafeInt64FromPtr(nb *int64) int64

func SafeStringFromPtr

func SafeStringFromPtr(str *string) string

Types

type FixedBuffer

type FixedBuffer []byte

func (FixedBuffer) WriteAt

func (fb FixedBuffer) WriteAt(p []byte, off int64) (int, error)

type LimitWriterAt

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

func NewLimitWriterAt

func NewLimitWriterAt(w io.WriterAt, s int64) *LimitWriterAt

func (LimitWriterAt) WriteAt

func (lwa LimitWriterAt) WriteAt(p []byte, off int64) (int, error)

Directories

Path Synopsis
package req provides request body validation facilities.
package req provides request body validation facilities.

Jump to

Keyboard shortcuts

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