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) ip := net.ParseIP(csr.Subject.CommonName)
subjectIsIP := ip != nil subjectIsIP := ip != nil
if subjectIsIP { if subjectIsIP {
// nolint:gocritic
canonicalized.IPAddresses = append(csr.IPAddresses, ip) canonicalized.IPAddresses = append(csr.IPAddresses, ip)
} else { } else {
// nolint:gocritic
canonicalized.DNSNames = append(csr.DNSNames, csr.Subject.CommonName) canonicalized.DNSNames = append(csr.DNSNames, csr.Subject.CommonName)
} }
} }