Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidFormat = errors.New("invalid range format")
ErrInvalidFormat is returned when it is an invalid range format
View Source
var ErrInvalidRange = errors.New("invalid range")
ErrInvalidRange is returned when it is an invalid range
View Source
var Now = time.Now
Now returns the current time
Functions ¶
func FormatRetryAfter ¶
FormatRetryAfter formats the `Retry-After` response header
func ParseQuery ¶
ParseQuery parses the values of v from the HTTP query
Types ¶
type HTTPRange ¶
type HTTPRange struct {
Start, End, Size int64
}
func ParseContentRange ¶
ParseContentRange parses the HTTP Content-Range header
e.g. Content-Range: <unit> <range-start>-<range-end>/<size> Content-Range: <unit> <range-start>-<range-end>/* Content-Range: <unit> */<size>
Click to show internal directories.
Click to hide internal directories.