Skip to content

Commit

Permalink
fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
crhntr committed Jul 6, 2023
1 parent fb54765 commit a8380d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions internal/builder/release_manifest_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package builder

import (
"crypto/sha1"
"encoding/hex"
"fmt"
"github.com/go-git/go-billy/v5"
"github.com/go-git/go-billy/v5/osfs"
Expand All @@ -19,10 +20,6 @@ type ReleaseManifest struct {
StemcellVersion string `yaml:"-"`
}

type compiledPackage struct {
Stemcell string `yaml:"stemcell"`
}

type ReleaseManifestReader struct {
fs billy.Filesystem
}
Expand Down Expand Up @@ -71,7 +68,7 @@ func (r ReleaseManifestReader) Read(releaseTarball string) (Part, error) {
return Part{}, err // NOTE: cannot replicate this error scenario in a test
}

outputReleaseManifest.SHA1 = fmt.Sprintf("%x", hash.Sum(nil))
outputReleaseManifest.SHA1 = hex.EncodeToString(hash.Sum(nil))

return Part{
File: releaseTarball,
Expand Down
2 changes: 1 addition & 1 deletion internal/builder/release_manifest_reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ version: 1.2.3
Expect(err).NotTo(HaveOccurred())

_, err = reader.Read(tarball.Name())
Expect(err).To(MatchError(fmt.Sprintf("failed to find release.MF in tarball")))
Expect(err).To(MatchError("failed to find release.MF in tarball"))
})
})

Expand Down

0 comments on commit a8380d7

Please sign in to comment.