Revert "pkg/*: Small linting fixes"

pull/8636/head
Matt Farina 5 years ago committed by GitHub
parent 0a28e5cbff
commit 2fc30d72e0
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(syscall.Stdin)
pw, err := terminal.ReadPassword(int(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.Equal(empty) {
if actual.Generated == 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.Equal(empty) {
if g.Created == empty {
t.Error("Expected created to be non-empty")
}
if g.Description == "" {

Loading…
Cancel
Save