Skip to content

Commit

Permalink
chore: update linter. (#1305)
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez authored Nov 24, 2020
1 parent 2bc55d0 commit 8006c74
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 14 deletions.
1 change: 1 addition & 0 deletions .golangci.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"nlreturn", # not relevant
"wrapcheck",
"tparallel", # not relevant
"paralleltest", # not relevant
"exhaustivestruct", # too many false-positive
]

Expand Down
6 changes: 3 additions & 3 deletions acme/commons.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"time"
)

// Challenge statuses
// Challenge statuses.
// https://tools.ietf.org/html/rfc8555#section-7.1.6
const (
StatusPending = "pending"
Expand Down Expand Up @@ -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):
Expand All @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions acme/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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"`
Expand Down
5 changes: 2 additions & 3 deletions certificate/certificates.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
10 changes: 6 additions & 4 deletions platform/config/env/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -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=""
Expand Down
2 changes: 1 addition & 1 deletion providers/dns/acmedns/acmedns.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion providers/dns/netcup/internal/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down

0 comments on commit 8006c74

Please sign in to comment.