Mute goconst warnings

This commit is contained in:
Andrey Smirnov
2017-06-03 23:21:49 +03:00
parent 0e9f966dd1
commit 6228a399cf

View File

@@ -383,7 +383,7 @@ func (context *AptlyContext) pgpProvider() string {
provider = context.config().GpgProvider
}
if !(provider == "gpg" || provider == "internal") {
if !(provider == "gpg" || provider == "internal") { // nolint: goconst
Fatal(fmt.Errorf("unknown gpg provider: %v", provider))
}
@@ -395,7 +395,7 @@ func (context *AptlyContext) GetSigner() pgp.Signer {
context.Lock()
defer context.Unlock()
if context.pgpProvider() == "gpg" {
if context.pgpProvider() == "gpg" { // nolint: goconst
return &pgp.GpgSigner{}
}
@@ -407,7 +407,7 @@ func (context *AptlyContext) GetVerifier() pgp.Verifier {
context.Lock()
defer context.Unlock()
if context.pgpProvider() == "gpg" {
if context.pgpProvider() == "gpg" { // nolint: goconst
return &pgp.GpgVerifier{}
}