forked from quic-go/quic-go
update golangci-lint action to v3, golangci-lint to v1.48.0 (#3499)
* run gofmt -s -w * stop using the deprecated io/ioutil package * update golangci-lint action to v3, golangci-lint to v1.48.0
This commit is contained in:
@@ -13,6 +13,7 @@ import (
|
||||
)
|
||||
|
||||
// on the CIs, the timing is a lot less precise, so scale every duration by this factor
|
||||
//
|
||||
//nolint:unparam
|
||||
func scaleDuration(t time.Duration) time.Duration {
|
||||
scaleFactor := 1
|
||||
|
||||
4
internal/testdata/cert.go
vendored
4
internal/testdata/cert.go
vendored
@@ -3,7 +3,7 @@ package testdata
|
||||
import (
|
||||
"crypto/tls"
|
||||
"crypto/x509"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path"
|
||||
"runtime"
|
||||
)
|
||||
@@ -38,7 +38,7 @@ func GetTLSConfig() *tls.Config {
|
||||
// AddRootCA adds the root CA certificate to a cert pool
|
||||
func AddRootCA(certPool *x509.CertPool) {
|
||||
caCertPath := path.Join(certPath, "ca.pem")
|
||||
caCertRaw, err := ioutil.ReadFile(caCertPath)
|
||||
caCertRaw, err := os.ReadFile(caCertPath)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
4
internal/testdata/cert_test.go
vendored
4
internal/testdata/cert_test.go
vendored
@@ -2,7 +2,7 @@ package testdata
|
||||
|
||||
import (
|
||||
"crypto/tls"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
@@ -24,7 +24,7 @@ var _ = Describe("certificates", func() {
|
||||
|
||||
conn, err := tls.Dial("tcp", "localhost:4433", &tls.Config{RootCAs: GetRootCA()})
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
data, err := ioutil.ReadAll(conn)
|
||||
data, err := io.ReadAll(conn)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(string(data)).To(Equal("foobar"))
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user