Skip to content

Commit 145d707

Browse files
committed
finish removal of deprecated ioutil pkg
1 parent 92f1a1b commit 145d707

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

pkg/farmer/main.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package main
33
import (
44
"crypto/tls"
55
"crypto/x509"
6-
"io/ioutil"
76
"net/http"
87
"os"
98
"runtime"
@@ -156,7 +155,7 @@ func ConnectFarmer() {
156155
log.Panic(err)
157156
}
158157
certPool := x509.NewCertPool()
159-
rootPEM, err := ioutil.ReadFile(RootCA)
158+
rootPEM, err := os.ReadFile(RootCA)
160159
if err != nil || rootPEM == nil {
161160
log.Panicf("nats: error loading or parsing rootCA file: %v", err)
162161
}

pkg/sprout/main.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package main
33
import (
44
"crypto/tls"
55
"crypto/x509"
6-
"io/ioutil"
76
"os"
87
"time"
98

@@ -89,7 +88,7 @@ func ConnectSprout() {
8988
log.Panic(err)
9089
}
9190
certPool := x509.NewCertPool()
92-
rootPEM, err := ioutil.ReadFile(SproutRootCA)
91+
rootPEM, err := os.ReadFile(SproutRootCA)
9392
if err != nil || rootPEM == nil {
9493
log.Panicf("nats: error loading or parsing rootCA file: %v", err)
9594
}

0 commit comments

Comments
 (0)