rangeutils

package
v2.0.3-beta.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Range

type Range struct {
	StartIndex uint64 `json:"start_index"`
	EndIndex   uint64 `json:"end_index"`
}

func GetRange added in v2.0.2

func GetRange(rangeStr string) (r *Range, err error)

GetRange parses Range according to range string. rangeStr: "start-end"

func ParseRange

func ParseRange(rangeStr string, length uint64) (*Range, error)

ParseRange parses the start and the end from rangeStr and returns them. length is file total length

func (Range) Length added in v2.0.2

func (r Range) Length() uint64

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