package
0.1.2
Repository: https://github.com/thatique/awan.git
Documentation: pkg.go.dev

# Functions

Copy returns a shallow copy of the header.
ParseAccept parses Accept* headers.
ParseHTTPSpec try to parse HTTP bytes range.
ParseList parses a comma separated list of values.
ParseTime parses the header as time.
ParseValueAndParams parses a comma separated list of values with optional semicolon separated name-value pairs.

# Variables

ErrInvalidHTTPRange thrown when we encounter invalid Spec.

# Structs

AcceptSpec describes an Accept* header.
HTTPRangeSpec represents a range specification Case 1: Not present -> represented by a nil RangeSpec Case 2: bytes=1-10 (absolute start and end offsets) -> RangeSpec{false, 1, 10} Case 3: bytes=10- (absolute start offset with end offset unspecified) -> RangeSpec{false, 10, -1} Case 4: bytes=-30 (suffix length specification) -> RangeSpec{true, -30, -1}.