Merge pull request #8631 from mrueg/sem-fixes

pkg/*: Small linting fixes
pull/8636/head
Matthew Fisher 4 years ago committed by GitHub
commit 0a28e5cbff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -135,7 +135,7 @@ func (p *Package) Clearsign(filename string) error {
// promptUser implements provenance.PassphraseFetcher
func promptUser(name string) ([]byte, error) {
fmt.Printf("Password for key %q > ", name)
pw, err := terminal.ReadPassword(int(syscall.Stdin))
pw, err := terminal.ReadPassword(syscall.Stdin)
fmt.Println()
return pw, err
}

@ -172,7 +172,7 @@ func TestIndexCustomSchemeDownload(t *testing.T) {
func verifyIndex(t *testing.T, actual *IndexFile) {
var empty time.Time
if actual.Generated == empty {
if actual.Generated.Equal(empty) {
t.Errorf("Generated should be greater than 0: %s", actual.Generated)
}
@ -242,7 +242,7 @@ func verifyIndex(t *testing.T, actual *IndexFile) {
if len(g.Maintainers) != 2 {
t.Error("Expected 2 maintainers.")
}
if g.Created == empty {
if g.Created.Equal(empty) {
t.Error("Expected created to be non-empty")
}
if g.Description == "" {

Loading…
Cancel
Save