From 145d70740f9c3236173260fe4448a6f36fa93a26 Mon Sep 17 00:00:00 2001 From: Tai Groot Date: Thu, 8 Jun 2023 12:49:32 -0700 Subject: [PATCH] finish removal of deprecated ioutil pkg --- pkg/farmer/main.go | 3 +-- pkg/sprout/main.go | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/pkg/farmer/main.go b/pkg/farmer/main.go index 932b3cc..22f3bdd 100644 --- a/pkg/farmer/main.go +++ b/pkg/farmer/main.go @@ -3,7 +3,6 @@ package main import ( "crypto/tls" "crypto/x509" - "io/ioutil" "net/http" "os" "runtime" @@ -156,7 +155,7 @@ func ConnectFarmer() { log.Panic(err) } certPool := x509.NewCertPool() - rootPEM, err := ioutil.ReadFile(RootCA) + rootPEM, err := os.ReadFile(RootCA) if err != nil || rootPEM == nil { log.Panicf("nats: error loading or parsing rootCA file: %v", err) } diff --git a/pkg/sprout/main.go b/pkg/sprout/main.go index 69f3971..e1a6fa0 100644 --- a/pkg/sprout/main.go +++ b/pkg/sprout/main.go @@ -3,7 +3,6 @@ package main import ( "crypto/tls" "crypto/x509" - "io/ioutil" "os" "time" @@ -89,7 +88,7 @@ func ConnectSprout() { log.Panic(err) } certPool := x509.NewCertPool() - rootPEM, err := ioutil.ReadFile(SproutRootCA) + rootPEM, err := os.ReadFile(SproutRootCA) if err != nil || rootPEM == nil { log.Panicf("nats: error loading or parsing rootCA file: %v", err) }