Last active
July 29, 2020 06:00
-
-
Save t4kemyh4nd/770cdd9092bea1e5ecf769d399a9269e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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