Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jreisinger committed Apr 12, 2023
1 parent 2b73744 commit b0944f8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions checksum/checksum.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type Checksum struct {
Name string // filename
}

// Get extracts checksums from the checksums files.
// Get extracts checksums and corresponding filenames from the checksums files.
func Get(assets []asset.Asset) ([]Checksum, error) {
var checksums []Checksum
for _, a := range assets {
Expand Down Expand Up @@ -68,8 +68,7 @@ func parseChecksumsLines(b []byte) ([]Checksum, error) {
return checksums, nil
}

// Verify computes SHA256 checksum of the filename from c and compares it to the
// checksum from c.
// Verify opens the filename from c, computes its SHA256 checksum and compares it to the checksum from c.
func (c Checksum) Verify() (ok bool, err error) {
file, err := os.Open(c.Name)
if err != nil {
Expand Down

0 comments on commit b0944f8

Please sign in to comment.