mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
Enable gosimple and ineffasign linters
This commit is contained in:
+2
-6
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user