Merge pull request #454 from inosato/replace-ioutil

Remove ioutil
This commit is contained in:
Matthias Rampke 2022-07-29 15:06:24 +00:00 committed by GitHub
commit 1e801bc499
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,7 +15,7 @@ package mapper
import (
"fmt"
"io/ioutil"
"os"
"regexp"
"sync"
"time"
@ -267,7 +267,7 @@ func (m *MetricMapper) InitFromYAMLString(fileContents string) error {
}
func (m *MetricMapper) InitFromFile(fileName string) error {
mappingStr, err := ioutil.ReadFile(fileName)
mappingStr, err := os.ReadFile(fileName)
if err != nil {
return err
}