Skip to content

Commit

Permalink
fixing vet error
Browse files Browse the repository at this point in the history
  • Loading branch information
raj-prince committed Oct 17, 2024
1 parent bc54ea3 commit 95fe8ec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion storage/dynamic_delay.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type dynamicDelay struct {
mu *sync.RWMutex
}

// validateDynamicDelayParams ensures
// validateDynamicDelayParams ensures,
// targetPercentile is a valid fraction (between 0 and 1).
// increaseRate is a positive number.
// minDelay is less than maxDelay.
Expand Down
8 changes: 4 additions & 4 deletions storage/http_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1352,7 +1352,7 @@ func setRangeReaderHeaders(h http.Header, params *newRangeReaderParams) error {
// readerReopen initiates a Read with offset and length, assuming we
// have already read seen bytes.
func readerReopen(ctx context.Context, header http.Header, params *newRangeReaderParams, s *settings,
doDownload func(context.Context) (*http.Response, error), applyConditions func() error, setGeneration func()) func(int64) (*http.Response, error) {
doDownload func(context.Context) (*http.Response, error), applyConditions func() error, setGeneration func()) func(int64) (*http.Response, error) {
return func(seen int64) (*http.Response, error) {
// If the context has already expired, return immediately without making a
// call.
Expand Down Expand Up @@ -1407,9 +1407,9 @@ func readerReopen(ctx context.Context, header http.Header, params *newRangeReade
}

partialContentNotSatisfied :=
!decompressiveTranscoding(res) &&
start > 0 && params.length != 0 &&
res.StatusCode != http.StatusPartialContent
!decompressiveTranscoding(res) &&
start > 0 && params.length != 0 &&
res.StatusCode != http.StatusPartialContent

if partialContentNotSatisfied {
res.Body.Close()
Expand Down

0 comments on commit 95fe8ec

Please sign in to comment.