Enable gosimple and ineffasign linters

This commit is contained in:
Andrey Smirnov
2017-04-27 18:34:30 +03:00
parent 7a7b981d4f
commit bae3f949b4
16 changed files with 32 additions and 49 deletions
+2 -6
View File
@@ -324,16 +324,12 @@ func (g *GpgVerifier) VerifyDetachedSignature(signature, cleartext io.Reader) er
func (g *GpgVerifier) IsClearSigned(clearsigned io.Reader) (bool, error) {
scanner := bufio.NewScanner(clearsigned)
for scanner.Scan() {
if strings.Index(scanner.Text(), "BEGIN PGP SIGN") != -1 {
if strings.Contains(scanner.Text(), "BEGIN PGP SIGN") {
return true, nil
}
}
if err := scanner.Err(); err != nil {
return false, err
}
return false, nil
return false, scanner.Err()
}
// VerifyClearsigned verifies clearsigned file using gpgv