diff options
| author | Eric Biggers <ebiggers@google.com> | 2022-12-04 13:27:43 -0800 |
|---|---|---|
| committer | Eric Biggers <ebiggers3@gmail.com> | 2022-12-04 14:07:39 -0800 |
| commit | 02875cef9010633b6689cfd1e2ceec9107b756b4 (patch) | |
| tree | 9f310eac398e99dd12f42d94967b2e1bf1c7fe83 /metadata | |
| parent | 5373b314473b08f13372ab55b551738307a85fbd (diff) | |
Stop using deprecated package io/ioutil
Since Go 1.16 (which recently became the minimum supported Go version
for this project), the package io/ioutil is deprecated in favor of
equivalent functionality in the io and os packages. staticcheck warns
about this. Address all the warnings by switching to the non-deprecated
replacement functions.
Diffstat (limited to 'metadata')
| -rw-r--r-- | metadata/config.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/metadata/config.go b/metadata/config.go index d9d694f..1d93d74 100644 --- a/metadata/config.go +++ b/metadata/config.go @@ -28,7 +28,6 @@ package metadata import ( "io" - "io/ioutil" "google.golang.org/protobuf/encoding/protojson" ) @@ -55,7 +54,7 @@ func WriteConfig(config *Config, out io.Writer) error { // ReadConfig writes the JSON data into the config structure func ReadConfig(in io.Reader) (*Config, error) { - bytes, err := ioutil.ReadAll(in) + bytes, err := io.ReadAll(in) if err != nil { return nil, err } |