From 42a9881b6905ee5ffc044d1f3f77dac2389ed521 Mon Sep 17 00:00:00 2001 From: GrĂ©goire DuchĂȘne Date: Sun, 2 Jan 2022 00:44:00 +0000 Subject: Migrate off deprecated functions --- go.mod | 2 +- main.go | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 5d180d6..5d3ba14 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ module go.awhk.org/gencert -go 1.12 +go 1.16 diff --git a/main.go b/main.go index 48e9660..996b359 100644 --- a/main.go +++ b/main.go @@ -16,7 +16,6 @@ import ( "errors" "flag" "fmt" - "io/ioutil" "log" "math/big" "net" @@ -198,7 +197,7 @@ func main() { parentKey := key parentCert := tmpl if caName != "" { - buf, err := ioutil.ReadFile(caName + ".key") + buf, err := os.ReadFile(caName + ".key") if err != nil { log.Fatalln("error: could not read the CA private key:", err) } @@ -210,7 +209,7 @@ func main() { if err != nil { log.Fatalln("error: could not parse the CA private key:", err) } - buf, err = ioutil.ReadFile(caName + ".crt") + buf, err = os.ReadFile(caName + ".crt") if err != nil { log.Fatalln("error: could not read the CA certificate:", err) } -- cgit v1.2.3-70-g09d2