1
0
mirror of https://github.com/go-acme/lego.git synced 2024-12-25 11:02:56 +02:00

chore: update linter. (#1305)

This commit is contained in:
Ludovic Fernandez 2020-11-24 09:38:11 +01:00 committed by GitHub
parent 2bc55d0057
commit 8006c744f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 16 additions and 14 deletions

View File

@ -41,6 +41,7 @@
"nlreturn", # not relevant
"wrapcheck",
"tparallel", # not relevant
"paralleltest", # not relevant
"exhaustivestruct", # too many false-positive
]

View File

@ -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 {

View File

@ -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"`

View File

@ -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 {

View File

@ -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=""

View File

@ -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.

View File

@ -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"`