chore: remove refs to deprecated io/ioutil

This commit is contained in:
guoguangwu
2023-06-21 12:12:27 +08:00
parent 339e243472
commit 6dc23ca804
15 changed files with 36 additions and 43 deletions

View File

@@ -16,7 +16,7 @@ limitations under the License.
package metrics
import (
"io/ioutil"
"os"
"testing"
)
@@ -121,7 +121,7 @@ func TestPrometheusMetricsParsingAndMatching(t *testing.T) {
for _, test := range testCases {
t.Run(test.name, func(t *testing.T) {
b, err := ioutil.ReadFile(test.metricsTextPath)
b, err := os.ReadFile(test.metricsTextPath)
if err != nil {
t.Errorf("Unexpected error reading file %s: %v", test.metricsTextPath, err)
}