Skip to content

Commit

Permalink
Pacify linter
Browse files Browse the repository at this point in the history
  • Loading branch information
pjcdawkins committed Aug 4, 2023
1 parent 7c90b25 commit 042e5b7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ jobs:
touch internal/legacy/archives/php_linux_arm64
touch internal/legacy/archives/php_darwin_amd64
touch internal/legacy/archives/php_darwin_arm64
touch internal/legacy/archives/platform.phar.sha256
touch internal/legacy/archives/php_windows_amd64.sha256
touch internal/legacy/archives/php_linux_amd64.sha256
touch internal/legacy/archives/php_linux_arm64.sha256
touch internal/legacy/archives/php_darwin_amd64.sha256
touch internal/legacy/archives/php_darwin_arm64.sha256
- name: Run linter
uses: golangci/golangci-lint-action@v3
Expand Down
4 changes: 2 additions & 2 deletions internal/file/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ var testableFS = afero.NewOsFs()

// CheckHash checks if a file has the given SHA256 hash.
// It supports reading the file's current hash from a static file saved next to it with the hashExt extension.
func CheckHash(filename string, hash string) (bool, error) {
func CheckHash(filename, hash string) (bool, error) {
if fh, err := afero.ReadFile(testableFS, filename+hashExt); err == nil {
return string(fh) == hash, nil
}
Expand All @@ -64,7 +64,7 @@ func CheckHash(filename string, hash string) (bool, error) {
return fh == hash, nil
}

func SaveHash(filename string, hash string) error {
func SaveHash(filename, hash string) error {
return Copy(filename+hashExt, []byte(hash))
}

Expand Down

0 comments on commit 042e5b7

Please sign in to comment.