Merge branch 'develop' into neilalexander/refactor

This commit is contained in:
Neil Alexander 2022-08-06 15:23:44 +01:00 committed by GitHub
commit dd66e8a9c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 15 deletions

View file

@ -8,7 +8,7 @@ import (
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"io"
"net"
"os"
"os/signal"
@ -51,10 +51,10 @@ func readConfig(log *log.Logger, useconf bool, useconffile string, normaliseconf
var err error
if useconffile != "" {
// Read the file from the filesystem
conf, err = ioutil.ReadFile(useconffile)
conf, err = os.ReadFile(useconffile)
} else {
// Read the file from stdin.
conf, err = ioutil.ReadAll(os.Stdin)
conf, err = io.ReadAll(os.Stdin)
}
if err != nil {
panic(err)