Skip to content

Commit

Permalink
Update incorrect comments
Browse files Browse the repository at this point in the history
Some minor refactoring to remove commented out code and fix some
incorrect documentation comments.
  • Loading branch information
ericcornelissen committed Oct 18, 2024
1 parent 018e8cd commit 72f69e7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
1 change: 0 additions & 1 deletion internal/ghasum/atoms.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ func compute(cfg *Config, actions []gha.GitHubAction, algo checksum.Algo) ([]sum
}
}

// checksum, err := dirhash.HashDir(actionDir, "", hashes[algo])
checksum, err := checksum.Compute(actionDir, algo)
if err != nil {
return nil, fmt.Errorf("could not compute checksum for %q: %v", action, err)
Expand Down
16 changes: 8 additions & 8 deletions internal/ghasum/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,35 +25,35 @@ var (
// initialized but is not.
ErrNotInitialized = errors.New("ghasum has not yet been initialized")

// ErrNotInitialized is the error used when the ghasum checksum file could not
// ErrSumfileCreate is the error used when the ghasum checksum file could not
// be created.
ErrSumfileCreate = errors.New("could not create a checksum file")

// ErrNotInitialized is the error used when the ghasum checksum file could not
// ErrSumfileEncode is the error used when the ghasum checksum file could not
// be encoded.
ErrSumfileEncode = errors.New("could not encode the checksum file")

// ErrNotInitialized is the error used when the ghasum checksum file could not
// ErrSumfileOpen is the error used when the ghasum checksum file could not
// be opened.
ErrSumfileOpen = errors.New("could not open the checksum file")

// ErrNotInitialized is the error used when a ghasum checksum file could not
// ErrSumfileDecode is the error used when a ghasum checksum file could not
// be decoded.
ErrSumfileDecode = errors.New("could not decode the checksum file")

// ErrNotInitialized is the error used when the ghasum checksum file could not
// ErrSumfileRead is the error used when the ghasum checksum file could not
// be read.
ErrSumfileRead = errors.New("could not read from the checksum file")

// ErrNotInitialized is the error used when the ghasum checksum file could not
// ErrSumfileRemove is the error used when the ghasum checksum file could not
// be removed.
ErrSumfileRemove = errors.New("could not remove the checksum file")

// ErrNotInitialized is the error used when the ghasum checksum file could not
// ErrSumfileUnlock is the error used when the ghasum checksum file could not
// be unlocked after usage.
ErrSumfileUnlock = errors.New("could not unlock the checksum file")

// ErrNotInitialized is the error used when the ghasum checksum file could not
// ErrSumfileWrite is the error used when the ghasum checksum file could not
// be written to.
ErrSumfileWrite = errors.New("could not write to the checksum file")
)

0 comments on commit 72f69e7

Please sign in to comment.