Skip to content

Instantly share code, notes, and snippets.

@t4kemyh4nd
Last active July 29, 2020 06:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save t4kemyh4nd/770cdd9092bea1e5ecf769d399a9269e to your computer and use it in GitHub Desktop.
Save t4kemyh4nd/770cdd9092bea1e5ecf769d399a9269e to your computer and use it in GitHub Desktop.
type httpRange struct {
start, length int64
}
func parseRange(s string, size int64) ([]httpRange, error) {
//redacted
var ranges []httpRange
//redacted
var r httpRange
//redacted
ranges = append(ranges, r)
if noOverlap && len(ranges) == 0 {
// The specified ranges did not overlap with the content.
return nil, errNoOverlap
}
return ranges, nil
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment