Skip to content

Commit

Permalink
Adding similarities like rest of function
Browse files Browse the repository at this point in the history
Signed-off-by: 7h3-3mp7y-m4n <emailtorash@gmail.com>
  • Loading branch information
7h3-3mp7y-m4n committed Oct 30, 2024
1 parent 14e5deb commit f743ee2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions uriget/uriget.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,10 @@ func (o *options) getOci(ctx context.Context, u *url.URL) ([]byte, error) {
return nil, fmt.Errorf("blob fetch failed: %w", err)
}
defer rc.Close()
raw, err := readLimited(rc, o.limit)
buff, err := readLimited(rc, o.limit)
if err != nil {
return nil, fmt.Errorf("blob read failed: %w", err)
}
return raw, nil
o.logger.Printf("Read %d bytes from %s", len(buff), specifiedFile)
return buff, nil
}

0 comments on commit f743ee2

Please sign in to comment.