diff --git a/.golangci.toml b/.golangci.toml index c0719964..01764647 100644 --- a/.golangci.toml +++ b/.golangci.toml @@ -41,6 +41,7 @@ "nlreturn", # not relevant "wrapcheck", "tparallel", # not relevant + "paralleltest", # not relevant "exhaustivestruct", # too many false-positive ] diff --git a/acme/commons.go b/acme/commons.go index a9b0b015..9635c6bd 100644 --- a/acme/commons.go +++ b/acme/commons.go @@ -7,7 +7,7 @@ import ( "time" ) -// Challenge statuses +// Challenge statuses. // https://tools.ietf.org/html/rfc8555#section-7.1.6 const ( StatusPending = "pending" @@ -256,7 +256,7 @@ type Identifier struct { Value string `json:"value"` } -// CSRMessage Certificate Signing Request +// CSRMessage Certificate Signing Request. // - https://tools.ietf.org/html/rfc8555#section-7.4 type CSRMessage struct { // csr (required, string): @@ -266,7 +266,7 @@ type CSRMessage struct { Csr string `json:"csr"` } -// RevokeCertMessage a certificate revocation message +// RevokeCertMessage a certificate revocation message. // - https://tools.ietf.org/html/rfc8555#section-7.6 // - https://tools.ietf.org/html/rfc5280#section-5.3.1 type RevokeCertMessage struct { diff --git a/acme/errors.go b/acme/errors.go index 74aa959f..f9adb317 100644 --- a/acme/errors.go +++ b/acme/errors.go @@ -10,7 +10,7 @@ const ( BadNonceErr = errNS + "badNonce" ) -// ProblemDetails the problem details object +// ProblemDetails the problem details object. // - https://tools.ietf.org/html/rfc7807#section-3.1 // - https://tools.ietf.org/html/rfc8555#section-7.3.3 type ProblemDetails struct { @@ -25,7 +25,7 @@ type ProblemDetails struct { URL string `json:"url,omitempty"` } -// SubProblem a "subproblems" +// SubProblem a "subproblems". // - https://tools.ietf.org/html/rfc8555#section-6.7.1 type SubProblem struct { Type string `json:"type,omitempty"` diff --git a/certificate/certificates.go b/certificate/certificates.go index bca7b699..ff0e2d52 100644 --- a/certificate/certificates.go +++ b/certificate/certificates.go @@ -561,9 +561,8 @@ func checkOrderStatus(order acme.ExtendedOrder) (bool, error) { } // https://tools.ietf.org/html/rfc8555#section-7.1.4 -// The domain name MUST be encoded -// in the form in which it would appear in a certificate. That is, it -// MUST be encoded according to the rules in Section 7 of [RFC5280]. +// The domain name MUST be encoded in the form in which it would appear in a certificate. +// That is, it MUST be encoded according to the rules in Section 7 of [RFC5280]. // // https://tools.ietf.org/html/rfc5280#section-7 func sanitizeDomain(domains []string) []string { diff --git a/platform/config/env/env.go b/platform/config/env/env.go index 41d164ca..334b076a 100644 --- a/platform/config/env/env.go +++ b/platform/config/env/env.go @@ -32,22 +32,24 @@ func Get(names ...string) (map[string]string, error) { return values, nil } -// GetWithFallback Get environment variable values -// The first name in each group is use as key in the result map +// GetWithFallback Get environment variable values. +// The first name in each group is use as key in the result map. +// +// case 1: // // // LEGO_ONE="ONE" // // LEGO_TWO="TWO" // env.GetWithFallback([]string{"LEGO_ONE", "LEGO_TWO"}) // // => "LEGO_ONE" = "ONE" // -// ---- +// case 2: // // // LEGO_ONE="" // // LEGO_TWO="TWO" // env.GetWithFallback([]string{"LEGO_ONE", "LEGO_TWO"}) // // => "LEGO_ONE" = "TWO" // -// ---- +// case 3: // // // LEGO_ONE="" // // LEGO_TWO="" diff --git a/providers/dns/acmedns/acmedns.go b/providers/dns/acmedns/acmedns.go index 7e04e7b2..4b63fde5 100644 --- a/providers/dns/acmedns/acmedns.go +++ b/providers/dns/acmedns/acmedns.go @@ -15,7 +15,7 @@ const ( // envNamespace is the prefix for ACME-DNS environment variables. envNamespace = "ACME_DNS_" - // EnvAPIBase is the environment variable name for the ACME-DNS API address + // EnvAPIBase is the environment variable name for the ACME-DNS API address. // (e.g. https://acmedns.your-domain.com). EnvAPIBase = envNamespace + "API_BASE" // EnvStoragePath is the environment variable name for the ACME-DNS JSON account data file. diff --git a/providers/dns/netcup/internal/client.go b/providers/dns/netcup/internal/client.go index 720e2759..a7e9d2e3 100644 --- a/providers/dns/netcup/internal/client.go +++ b/providers/dns/netcup/internal/client.go @@ -54,7 +54,7 @@ type UpdateDNSRecordsRequest struct { } // DNSRecordSet as specified in netcup WSDL. -// needed in UpdateDNSRecordsRequest +// needed in UpdateDNSRecordsRequest. // https://ccp.netcup.net/run/webservice/servers/endpoint.php#Dnsrecordset type DNSRecordSet struct { DNSRecords []DNSRecord `json:"dnsrecords"`