mirror of
https://github.com/go-acme/lego.git
synced 2024-11-28 09:33:13 +02:00
chore: update linter. (#1305)
This commit is contained in:
parent
2bc55d0057
commit
8006c744f0
@ -41,6 +41,7 @@
|
|||||||
"nlreturn", # not relevant
|
"nlreturn", # not relevant
|
||||||
"wrapcheck",
|
"wrapcheck",
|
||||||
"tparallel", # not relevant
|
"tparallel", # not relevant
|
||||||
|
"paralleltest", # not relevant
|
||||||
"exhaustivestruct", # too many false-positive
|
"exhaustivestruct", # too many false-positive
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Challenge statuses
|
// Challenge statuses.
|
||||||
// https://tools.ietf.org/html/rfc8555#section-7.1.6
|
// https://tools.ietf.org/html/rfc8555#section-7.1.6
|
||||||
const (
|
const (
|
||||||
StatusPending = "pending"
|
StatusPending = "pending"
|
||||||
@ -256,7 +256,7 @@ type Identifier struct {
|
|||||||
Value string `json:"value"`
|
Value string `json:"value"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// CSRMessage Certificate Signing Request
|
// CSRMessage Certificate Signing Request.
|
||||||
// - https://tools.ietf.org/html/rfc8555#section-7.4
|
// - https://tools.ietf.org/html/rfc8555#section-7.4
|
||||||
type CSRMessage struct {
|
type CSRMessage struct {
|
||||||
// csr (required, string):
|
// csr (required, string):
|
||||||
@ -266,7 +266,7 @@ type CSRMessage struct {
|
|||||||
Csr string `json:"csr"`
|
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/rfc8555#section-7.6
|
||||||
// - https://tools.ietf.org/html/rfc5280#section-5.3.1
|
// - https://tools.ietf.org/html/rfc5280#section-5.3.1
|
||||||
type RevokeCertMessage struct {
|
type RevokeCertMessage struct {
|
||||||
|
@ -10,7 +10,7 @@ const (
|
|||||||
BadNonceErr = errNS + "badNonce"
|
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/rfc7807#section-3.1
|
||||||
// - https://tools.ietf.org/html/rfc8555#section-7.3.3
|
// - https://tools.ietf.org/html/rfc8555#section-7.3.3
|
||||||
type ProblemDetails struct {
|
type ProblemDetails struct {
|
||||||
@ -25,7 +25,7 @@ type ProblemDetails struct {
|
|||||||
URL string `json:"url,omitempty"`
|
URL string `json:"url,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// SubProblem a "subproblems"
|
// SubProblem a "subproblems".
|
||||||
// - https://tools.ietf.org/html/rfc8555#section-6.7.1
|
// - https://tools.ietf.org/html/rfc8555#section-6.7.1
|
||||||
type SubProblem struct {
|
type SubProblem struct {
|
||||||
Type string `json:"type,omitempty"`
|
Type string `json:"type,omitempty"`
|
||||||
|
@ -561,9 +561,8 @@ func checkOrderStatus(order acme.ExtendedOrder) (bool, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// https://tools.ietf.org/html/rfc8555#section-7.1.4
|
// https://tools.ietf.org/html/rfc8555#section-7.1.4
|
||||||
// The domain name MUST be encoded
|
// The domain name MUST be encoded in the form in which it would appear in a certificate.
|
||||||
// in the form in which it would appear in a certificate. That is, it
|
// That is, it MUST be encoded according to the rules in Section 7 of [RFC5280].
|
||||||
// MUST be encoded according to the rules in Section 7 of [RFC5280].
|
|
||||||
//
|
//
|
||||||
// https://tools.ietf.org/html/rfc5280#section-7
|
// https://tools.ietf.org/html/rfc5280#section-7
|
||||||
func sanitizeDomain(domains []string) []string {
|
func sanitizeDomain(domains []string) []string {
|
||||||
|
10
platform/config/env/env.go
vendored
10
platform/config/env/env.go
vendored
@ -32,22 +32,24 @@ func Get(names ...string) (map[string]string, error) {
|
|||||||
return values, nil
|
return values, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetWithFallback Get environment variable values
|
// GetWithFallback Get environment variable values.
|
||||||
// The first name in each group is use as key in the result map
|
// The first name in each group is use as key in the result map.
|
||||||
|
//
|
||||||
|
// case 1:
|
||||||
//
|
//
|
||||||
// // LEGO_ONE="ONE"
|
// // LEGO_ONE="ONE"
|
||||||
// // LEGO_TWO="TWO"
|
// // LEGO_TWO="TWO"
|
||||||
// env.GetWithFallback([]string{"LEGO_ONE", "LEGO_TWO"})
|
// env.GetWithFallback([]string{"LEGO_ONE", "LEGO_TWO"})
|
||||||
// // => "LEGO_ONE" = "ONE"
|
// // => "LEGO_ONE" = "ONE"
|
||||||
//
|
//
|
||||||
// ----
|
// case 2:
|
||||||
//
|
//
|
||||||
// // LEGO_ONE=""
|
// // LEGO_ONE=""
|
||||||
// // LEGO_TWO="TWO"
|
// // LEGO_TWO="TWO"
|
||||||
// env.GetWithFallback([]string{"LEGO_ONE", "LEGO_TWO"})
|
// env.GetWithFallback([]string{"LEGO_ONE", "LEGO_TWO"})
|
||||||
// // => "LEGO_ONE" = "TWO"
|
// // => "LEGO_ONE" = "TWO"
|
||||||
//
|
//
|
||||||
// ----
|
// case 3:
|
||||||
//
|
//
|
||||||
// // LEGO_ONE=""
|
// // LEGO_ONE=""
|
||||||
// // LEGO_TWO=""
|
// // LEGO_TWO=""
|
||||||
|
@ -15,7 +15,7 @@ const (
|
|||||||
// envNamespace is the prefix for ACME-DNS environment variables.
|
// envNamespace is the prefix for ACME-DNS environment variables.
|
||||||
envNamespace = "ACME_DNS_"
|
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).
|
// (e.g. https://acmedns.your-domain.com).
|
||||||
EnvAPIBase = envNamespace + "API_BASE"
|
EnvAPIBase = envNamespace + "API_BASE"
|
||||||
// EnvStoragePath is the environment variable name for the ACME-DNS JSON account data file.
|
// EnvStoragePath is the environment variable name for the ACME-DNS JSON account data file.
|
||||||
|
@ -54,7 +54,7 @@ type UpdateDNSRecordsRequest struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// DNSRecordSet as specified in netcup WSDL.
|
// DNSRecordSet as specified in netcup WSDL.
|
||||||
// needed in UpdateDNSRecordsRequest
|
// needed in UpdateDNSRecordsRequest.
|
||||||
// https://ccp.netcup.net/run/webservice/servers/endpoint.php#Dnsrecordset
|
// https://ccp.netcup.net/run/webservice/servers/endpoint.php#Dnsrecordset
|
||||||
type DNSRecordSet struct {
|
type DNSRecordSet struct {
|
||||||
DNSRecords []DNSRecord `json:"dnsrecords"`
|
DNSRecords []DNSRecord `json:"dnsrecords"`
|
||||||
|
Loading…
Reference in New Issue
Block a user