Skip to content

Commit

Permalink
ChecksumFromFile: change checksummedURL to checksummedPath for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
azr committed Feb 4, 2020
1 parent 8c9292b commit ec2266f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions checksum.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,14 @@ func newChecksumFromValue(checksumValue, filename string) (*FileChecksum, error)
}

// ChecksumFromFile will return the first file checksum found in the
// `checksumURL` file that corresponds to the `checksummedURL` path.
// `checksumURL` file that corresponds to the `checksummedPath` path.
//
// ChecksumFromFile will infer the hashing algorithm based on the checksumURL
// file content.
//
// ChecksumFromFile will only return checksums for files that match
// checksummedURL, which is the object being checksummed.
func (c *Client) ChecksumFromFile(ctx context.Context, checksumURL, checksummedURL string) (*FileChecksum, error) {
// checksummedPath, which is the object being checksummed.
func (c *Client) ChecksumFromFile(ctx context.Context, checksumURL, checksummedPath string) (*FileChecksum, error) {
checksumFileURL, err := urlhelper.Parse(checksumURL)
if err != nil {
return nil, err
Expand All @@ -216,8 +216,8 @@ func (c *Client) ChecksumFromFile(ctx context.Context, checksumURL, checksummedU
"Error downloading checksum file: %s", err)
}

filename := filepath.Base(checksummedURL)
absPath, err := filepath.Abs(checksummedURL)
filename := filepath.Base(checksummedPath)
absPath, err := filepath.Abs(checksummedPath)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit ec2266f

Please sign in to comment.