From 02875cef9010633b6689cfd1e2ceec9107b756b4 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Sun, 4 Dec 2022 13:27:43 -0800 Subject: 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. --- metadata/config.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'metadata') 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 } -- cgit v1.2.3