Skip to content

Commit a074484

Browse files
authored
Merge branch 'google:master' into fix-dockerfile-typo
2 parents 0206b1a + e9068e3 commit a074484

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+316
-1181
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
with:
1616
go-version: ${{ matrix.go-versions }}
1717
- name: Checkout code
18-
uses: actions/checkout@v2
18+
uses: actions/checkout@v3
1919
- name: Run presubmit checks
2020
run: |
2121
source ${{ matrix.environment-variables }}

.golangci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ issues:
3333
- "(method|func) [A-Z].* should be .*"
3434
# Stuttering affects exported names:
3535
- "type name will be used as .*\\.[A-Z]{1}.* by other packages, and that stutters"
36-
# TODO: Migrate away from io/ioutil
37-
- "\"io/ioutil\" has been deprecated since Go 1.16"
3836
exclude-rules:
3937
# utils/cpuload/netlink/netlink.go:102:15: Error return value of `binary.Write` is not checked (errcheck)
4038
# There are more similar issues in this file

client/client.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import (
2525
"encoding/json"
2626
"fmt"
2727
"io"
28-
"io/ioutil"
2928
"net/http"
3029
"path"
3130
"strings"
@@ -187,7 +186,7 @@ func (c *Client) httpGetJSONData(data, postData interface{}, url, infoName strin
187186
return fmt.Errorf("received empty response for %q from %q", infoName, url)
188187
}
189188
defer resp.Body.Close()
190-
body, err := ioutil.ReadAll(resp.Body)
189+
body, err := io.ReadAll(resp.Body)
191190
if err != nil {
192191
err = fmt.Errorf("unable to read all %q from %q: %v", infoName, url, err)
193192
return err

client/v2/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
"bytes"
2020
"encoding/json"
2121
"fmt"
22-
"io/ioutil"
22+
"io"
2323
"net/http"
2424
"net/url"
2525
"path"
@@ -147,7 +147,7 @@ func (c *Client) httpGetResponse(postData interface{}, urlPath, infoName string)
147147
return nil, fmt.Errorf("received empty response for %q from %q", infoName, urlPath)
148148
}
149149
defer resp.Body.Close()
150-
body, err := ioutil.ReadAll(resp.Body)
150+
body, err := io.ReadAll(resp.Body)
151151
if err != nil {
152152
err = fmt.Errorf("unable to read all %q from %q: %v", infoName, urlPath, err)
153153
return nil, err

cmd/go.mod

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/google/cadvisor/cmd
22

3-
go 1.17
3+
go 1.19
44

55
// Record that the cmd module requires the cadvisor library module.
66
// The github.com/google/cadvisor/cmd module is built using the Makefile
@@ -23,27 +23,27 @@ require (
2323
github.com/onsi/gomega v1.24.1 // indirect
2424
github.com/pquerna/ffjson v0.0.0-20190930134022-aa0246cd15f7 // indirect
2525
github.com/prometheus/client_golang v1.14.0
26-
github.com/stretchr/testify v1.8.1
27-
golang.org/x/oauth2 v0.3.0
26+
github.com/stretchr/testify v1.8.2
27+
golang.org/x/oauth2 v0.4.0
2828
google.golang.org/api v0.104.0
2929
gopkg.in/olivere/elastic.v2 v2.0.61
30-
k8s.io/klog/v2 v2.80.1
31-
k8s.io/utils v0.0.0-20211116205334-6203023598ed
30+
k8s.io/klog/v2 v2.100.1
31+
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2
3232
)
3333

3434
require (
35-
cloud.google.com/go/compute v1.13.0 // indirect
36-
cloud.google.com/go/compute/metadata v0.2.2 // indirect
35+
cloud.google.com/go/compute v1.15.1 // indirect
36+
cloud.google.com/go/compute/metadata v0.2.3 // indirect
3737
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
3838
github.com/Microsoft/go-winio v0.4.15 // indirect
3939
github.com/aws/aws-sdk-go v1.35.24 // indirect
4040
github.com/beorn7/perks v1.0.1 // indirect
4141
github.com/blang/semver v3.5.1+incompatible // indirect
42-
github.com/cespare/xxhash/v2 v2.1.2 // indirect
42+
github.com/cespare/xxhash/v2 v2.2.0 // indirect
4343
github.com/checkpoint-restore/go-criu/v5 v5.3.0 // indirect
4444
github.com/cilium/ebpf v0.7.0 // indirect
4545
github.com/containerd/console v1.0.3 // indirect
46-
github.com/containerd/ttrpc v1.1.0 // indirect
46+
github.com/containerd/ttrpc v1.2.2 // indirect
4747
github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534 // indirect
4848
github.com/cyphar/filepath-securejoin v0.2.3 // indirect
4949
github.com/davecgh/go-spew v1.1.1 // indirect
@@ -82,7 +82,7 @@ require (
8282
github.com/mrunalp/fileutils v0.5.0 // indirect
8383
github.com/opencontainers/go-digest v1.0.0 // indirect
8484
github.com/opencontainers/image-spec v1.0.2 // indirect
85-
github.com/opencontainers/runc v1.1.4 // indirect
85+
github.com/opencontainers/runc v1.1.7 // indirect
8686
github.com/opencontainers/runtime-spec v1.0.3-0.20220909204839-494a5a6aca78 // indirect
8787
github.com/opencontainers/selinux v1.10.0 // indirect
8888
github.com/pierrec/lz4/v4 v4.1.17 // indirect
@@ -101,13 +101,13 @@ require (
101101
github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df // indirect
102102
go.opencensus.io v0.24.0 // indirect
103103
golang.org/x/crypto v0.1.0 // indirect
104-
golang.org/x/net v0.7.0 // indirect
105-
golang.org/x/sys v0.5.0 // indirect
106-
golang.org/x/text v0.7.0 // indirect
104+
golang.org/x/net v0.8.0 // indirect
105+
golang.org/x/sys v0.6.0 // indirect
106+
golang.org/x/text v0.8.0 // indirect
107107
golang.org/x/time v0.1.0 // indirect
108108
google.golang.org/appengine v1.6.7 // indirect
109-
google.golang.org/genproto v0.0.0-20221206210731-b1a01be3a5f6 // indirect
110-
google.golang.org/grpc v1.51.0 // indirect
109+
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect
110+
google.golang.org/grpc v1.54.0 // indirect
111111
google.golang.org/protobuf v1.28.1 // indirect
112112
gopkg.in/yaml.v3 v3.0.1 // indirect
113113
)

0 commit comments

Comments
 (0)