Merge pull request #2775 from lucas-clemente/more-linters

enable more linters, update golangci-lint to v1.31
This commit is contained in:
Marten Seemann
2020-09-14 13:55:24 +07:00
committed by GitHub
3 changed files with 6 additions and 3 deletions

View File

@@ -10,4 +10,4 @@ jobs:
uses: golangci/golangci-lint-action@v1
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.30
version: v1.31

View File

@@ -17,10 +17,13 @@ linters-settings:
linters:
disable-all: true
enable:
- asciicheck
- deadcode
- depguard
- exportloopref
- goconst
- goimports
- gofmt
- gosimple
- ineffassign
- misspell

View File

@@ -116,7 +116,7 @@ var _ = BeforeSuite(func() {
panic(err)
}
tlsConfig = &tls.Config{
Certificates: []tls.Certificate{tls.Certificate{
Certificates: []tls.Certificate{{
Certificate: [][]byte{leafCert.Raw},
PrivateKey: leafPrivateKey,
}},
@@ -260,7 +260,7 @@ func generateTLSConfigWithLongCertChain(ca *x509.Certificate, caPrivateKey *rsa.
rawCerts[0] = leafCert.Raw
return &tls.Config{
Certificates: []tls.Certificate{tls.Certificate{
Certificates: []tls.Certificate{{
Certificate: rawCerts,
PrivateKey: leafPrivateKey,
}},