don't use ioutil
This commit is contained in:
3
main.go
3
main.go
@@ -6,7 +6,6 @@ import (
|
|||||||
"encoding/pem"
|
"encoding/pem"
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
@@ -132,7 +131,7 @@ func main() {
|
|||||||
// only try to load certificate from file if the command line argument was specified
|
// only try to load certificate from file if the command line argument was specified
|
||||||
if isFlagPassed("cert-file") {
|
if isFlagPassed("cert-file") {
|
||||||
// Try to read the file
|
// Try to read the file
|
||||||
cf, err := ioutil.ReadFile(GetFilePath(*certFile))
|
cf, err := os.ReadFile(GetFilePath(*certFile))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
output.AuthSuccess = false
|
output.AuthSuccess = false
|
||||||
output.Error = err.Error()
|
output.Error = err.Error()
|
||||||
|
Reference in New Issue
Block a user