Skip to content

Commit

Permalink
finish removal of deprecated ioutil pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
taigrr committed Jun 8, 2023
1 parent 92f1a1b commit 145d707
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions pkg/farmer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package main
import (
"crypto/tls"
"crypto/x509"
"io/ioutil"
"net/http"
"os"
"runtime"
Expand Down Expand Up @@ -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)
}
Expand Down
3 changes: 1 addition & 2 deletions pkg/sprout/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package main
import (
"crypto/tls"
"crypto/x509"
"io/ioutil"
"os"
"time"

Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit 145d707

Please sign in to comment.