uid

package
v3.10.0-0.43.0+incompa... Latest Latest
Warning

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

Go to latest
Published: May 15, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBlockSlashBadFormat = fmt.Errorf("block not in the format \"<start>/<size>\"")
	ErrBlockDashBadFormat  = fmt.Errorf("block not in the format \"<start>-<end>\"")
)

Functions

This section is empty.

Types

type Block

type Block struct {
	Start uint32
	End   uint32
}

func ParseBlock

func ParseBlock(in string) (Block, error)

func (Block) RangeString

func (b Block) RangeString() string

func (Block) Size

func (b Block) Size() uint32

func (Block) String

func (b Block) String() string

type Range

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

func NewRange

func NewRange(start, end, size uint32) (*Range, error)

func ParseRange

func ParseRange(in string) (*Range, error)

func (*Range) BlockAt

func (r *Range) BlockAt(offset uint32) (Block, bool)

func (*Range) Contains

func (r *Range) Contains(block Block) bool

func (*Range) Offset

func (r *Range) Offset(block Block) (bool, uint32)

func (*Range) Size

func (r *Range) Size() uint32

func (*Range) String

func (r *Range) String() string

Jump to

Keyboard shortcuts

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