Fix linting

This commit is contained in:
Herman Slatman 2021-12-13 16:01:40 +01:00
parent a5d33512fe
commit ca707cbe05
No known key found for this signature in database
GPG Key ID: F4D8A44EA0A75A4F

View File

@ -297,8 +297,10 @@ func canonicalize(csr *x509.CertificateRequest) (canonicalized *x509.Certificate
ip := net.ParseIP(csr.Subject.CommonName)
subjectIsIP := ip != nil
if subjectIsIP {
// nolint:gocritic
canonicalized.IPAddresses = append(csr.IPAddresses, ip)
} else {
// nolint:gocritic
canonicalized.DNSNames = append(csr.DNSNames, csr.Subject.CommonName)
}
}