fix loggercheck linter

Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
This commit is contained in:
Tim Ramlot 2024-04-29 16:48:59 +02:00
parent eb9f8880fd
commit d6404482e3
No known key found for this signature in database
GPG Key ID: 47428728E0C2878D
5 changed files with 6 additions and 5 deletions

View File

@ -10,7 +10,6 @@ issues:
- tenv
- exhaustive
- nilerr
- loggercheck
- forbidigo
- interfacebloat
- predeclared

View File

@ -173,7 +173,7 @@ func Run(opts *config.CAInjectorConfiguration, ctx context.Context) error {
err = cainjector.RegisterAllInjectors(ctx, mgr, setupOptions)
if err != nil {
log.Error(err, "failed to register controllers", err)
log.Error(err, "failed to register controllers")
return err
}

View File

@ -724,7 +724,9 @@ func getPreferredCertChain(
if cert.Issuer.CommonName == preferredChain {
// if the issuer's CN matched the preferred chain it means this bundle is
// signed by the requested chain
log.V(logf.DebugLevel).WithValues("Issuer CN", cert.Issuer.CommonName).Info("Selecting preferred ACME bundle with a matching Common Name from %s", name)
log.V(logf.DebugLevel).
WithValues("Issuer CN", cert.Issuer.CommonName).
Info("Selecting preferred ACME bundle with a matching Common Name from chain", "chainName", name)
return true, nil
}

View File

@ -145,7 +145,7 @@ func (c *DNSProvider) Present(domain, fqdn, value string) error {
func (c *DNSProvider) CleanUp(domain, fqdn, value string) error {
z, err := c.getHostedZoneName(fqdn)
if err != nil {
c.log.Error(err, "Error getting hosted zone name for:", fqdn)
c.log.Error(err, "Error getting hosted zone name for fqdn", "fqdn", fqdn)
return err
}

View File

@ -265,7 +265,7 @@ func (c *DNSProvider) getHostedZone(domain string) (string, error) {
}
}
c.log.V(logf.DebugLevel).Info("No matching public GoogleCloud managed-zone for domain, falling back to a private managed-zone", authZone)
c.log.V(logf.DebugLevel).Info("No matching public GoogleCloud managed-zone for domain, falling back to a private managed-zone", "authZone", authZone)
// fall back to first available zone, if none public
return zones.ManagedZones[0].Name, nil
}