chore: update linter. (#1228)

This commit is contained in:
Ludovic Fernandez 2020-08-09 16:39:44 +02:00 committed by GitHub
parent 3fe5329376
commit b62e1f9352
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 15 additions and 18 deletions

View file

@ -38,6 +38,7 @@
"nestif", # too many false-positive "nestif", # too many false-positive
"goerr113", # not relevant "goerr113", # not relevant
"noctx", "noctx",
"nlreturn",
] ]
[issues] [issues]

View file

@ -11,7 +11,7 @@ const (
// overallRequestLimit is the overall number of request per second // overallRequestLimit is the overall number of request per second
// limited on the "new-reg", "new-authz" and "new-cert" endpoints. // limited on the "new-reg", "new-authz" and "new-cert" endpoints.
// From the documentation the limitation is 20 requests per second, // From the documentation the limitation is 20 requests per second,
// but using 20 as value doesn't work but 18 do // but using 20 as value doesn't work but 18 do.
overallRequestLimit = 18 overallRequestLimit = 18
) )

View file

@ -11,11 +11,11 @@ type Type string
const ( const (
// HTTP01 is the "http-01" ACME challenge https://tools.ietf.org/html/rfc8555#section-8.3 // HTTP01 is the "http-01" ACME challenge https://tools.ietf.org/html/rfc8555#section-8.3
// Note: ChallengePath returns the URL path to fulfill this challenge // Note: ChallengePath returns the URL path to fulfill this challenge.
HTTP01 = Type("http-01") HTTP01 = Type("http-01")
// DNS01 is the "dns-01" ACME challenge https://tools.ietf.org/html/rfc8555#section-8.4 // DNS01 is the "dns-01" ACME challenge https://tools.ietf.org/html/rfc8555#section-8.4
// Note: GetRecord returns a DNS record which will fulfill this challenge // Note: GetRecord returns a DNS record which will fulfill this challenge.
DNS01 = Type("dns-01") DNS01 = Type("dns-01")
// TLSALPN01 is the "tls-alpn-01" ACME challenge https://tools.ietf.org/html/draft-ietf-acme-tls-alpn-07 // TLSALPN01 is the "tls-alpn-01" ACME challenge https://tools.ietf.org/html/draft-ietf-acme-tls-alpn-07

View file

@ -17,13 +17,13 @@ import (
) )
const ( const (
// DefaultPropagationTimeout default propagation timeout // DefaultPropagationTimeout default propagation timeout.
DefaultPropagationTimeout = 60 * time.Second DefaultPropagationTimeout = 60 * time.Second
// DefaultPollingInterval default polling interval // DefaultPollingInterval default polling interval.
DefaultPollingInterval = 2 * time.Second DefaultPollingInterval = 2 * time.Second
// DefaultTTL default TTL // DefaultTTL default TTL.
DefaultTTL = 120 DefaultTTL = 120
) )

View file

@ -27,10 +27,10 @@ const (
// the system-wide trusted root list. // the system-wide trusted root list.
caServerNameEnvVar = "LEGO_CA_SERVER_NAME" caServerNameEnvVar = "LEGO_CA_SERVER_NAME"
// LEDirectoryProduction URL to the Let's Encrypt production // LEDirectoryProduction URL to the Let's Encrypt production.
LEDirectoryProduction = "https://acme-v02.api.letsencrypt.org/directory" LEDirectoryProduction = "https://acme-v02.api.letsencrypt.org/directory"
// LEDirectoryStaging URL to the Let's Encrypt staging // LEDirectoryStaging URL to the Let's Encrypt staging.
LEDirectoryStaging = "https://acme-staging-v02.api.letsencrypt.org/directory" LEDirectoryStaging = "https://acme-staging-v02.api.letsencrypt.org/directory"
) )

View file

@ -8,9 +8,8 @@ import (
"testing" "testing"
"time" "time"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
) )
func setupClientTest() (*http.ServeMux, *Client, func()) { func setupClientTest() (*http.ServeMux, *Client, func()) {

View file

@ -17,7 +17,7 @@ import (
// Gandi API domain examples: http://doc.rpc.gandi.net/domain/faq.html // Gandi API domain examples: http://doc.rpc.gandi.net/domain/faq.html
const ( const (
// defaultBaseURL Gandi XML-RPC endpoint used by Present and CleanUp // defaultBaseURL Gandi XML-RPC endpoint used by Present and CleanUp.
defaultBaseURL = "https://rpc.gandi.net/xmlrpc/" defaultBaseURL = "https://rpc.gandi.net/xmlrpc/"
minTTL = 300 minTTL = 300
) )

View file

@ -9,9 +9,8 @@ import (
"strings" "strings"
"testing" "testing"
"github.com/go-acme/lego/v3/platform/tester"
"github.com/go-acme/lego/v3/challenge/dns01" "github.com/go-acme/lego/v3/challenge/dns01"
"github.com/go-acme/lego/v3/platform/tester"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )

View file

@ -8,11 +8,10 @@ import (
"strings" "strings"
"time" "time"
"github.com/go-acme/lego/v3/providers/dns/netcup/internal"
"github.com/go-acme/lego/v3/challenge/dns01" "github.com/go-acme/lego/v3/challenge/dns01"
"github.com/go-acme/lego/v3/log" "github.com/go-acme/lego/v3/log"
"github.com/go-acme/lego/v3/platform/config/env" "github.com/go-acme/lego/v3/platform/config/env"
"github.com/go-acme/lego/v3/providers/dns/netcup/internal"
) )
// Environment variables names. // Environment variables names.

View file

@ -15,7 +15,7 @@ import (
const ( const (
defaultBaseURL = "https://dns.api.nifcloud.com" defaultBaseURL = "https://dns.api.nifcloud.com"
apiVersion = "2012-12-12N2013-12-16" apiVersion = "2012-12-12N2013-12-16"
// XMLNs XML NS of Route53 // XMLNs XML NS of Route53.
XMLNs = "https://route53.amazonaws.com/doc/2012-12-12/" XMLNs = "https://route53.amazonaws.com/doc/2012-12-12/"
) )

View file

@ -7,11 +7,10 @@ import (
"net/http" "net/http"
"time" "time"
"github.com/go-acme/lego/v3/providers/dns/nifcloud/internal"
"github.com/go-acme/lego/v3/challenge/dns01" "github.com/go-acme/lego/v3/challenge/dns01"
"github.com/go-acme/lego/v3/platform/config/env" "github.com/go-acme/lego/v3/platform/config/env"
"github.com/go-acme/lego/v3/platform/wait" "github.com/go-acme/lego/v3/platform/wait"
"github.com/go-acme/lego/v3/providers/dns/nifcloud/internal"
) )
// Environment variables names. // Environment variables names.