Replace ioutils with os and io (#87)

This commit is contained in:
Thomas Gruber
2022-10-09 17:03:38 +02:00
committed by GitHub
parent 8849824ba9
commit 0fbff00996
9 changed files with 30 additions and 32 deletions

View File

@@ -12,7 +12,6 @@ import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"math"
"os"
"os/signal"
@@ -154,7 +153,7 @@ func getBaseFreq() float64 {
}
var freq float64 = math.NaN()
for _, f := range files {
buffer, err := ioutil.ReadFile(f)
buffer, err := os.ReadFile(f)
if err == nil {
data := strings.Replace(string(buffer), "\n", "", -1)
x, err := strconv.ParseInt(data, 0, 64)