Skip to content

Commit

Permalink
fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
mcorbin committed Nov 19, 2022
1 parent bb50c14 commit 00ccd8d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 1 addition & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package cmd

import (
"fmt"
"io/ioutil"
"log"
"os"
"os/signal"
Expand Down Expand Up @@ -82,7 +81,7 @@ func Main() {
errChan <- nil
case syscall.SIGHUP:
logger.Info(fmt.Sprintf("Received signal %s, reload", sig))
newFile, err := ioutil.ReadFile(c.String("config"))
newFile, err := os.ReadFile(c.String("config"))
if err != nil {
logger.Error(err.Error())
} else {
Expand Down
3 changes: 2 additions & 1 deletion healthcheck/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"io/ioutil"
"net"
"net/http"
"os"
"regexp"
"time"

Expand Down Expand Up @@ -143,7 +144,7 @@ func (h *HTTPHealthcheck) Initialize() error {
tlsConfig.Certificates = []tls.Certificate{cert}
}
if h.Config.Cacert != "" {
caCert, err := ioutil.ReadFile(h.Config.Cacert)
caCert, err := os.ReadFile(h.Config.Cacert)
if err != nil {
return errors.Wrapf(err, "Fail to load the ca certificate")
}
Expand Down
4 changes: 2 additions & 2 deletions healthcheck/tls.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"crypto/x509"
"encoding/json"
"fmt"
"io/ioutil"
"net"
"os"
"time"

"github.com/pkg/errors"
Expand Down Expand Up @@ -114,7 +114,7 @@ func (h *TLSHealthcheck) Initialize() error {
tlsConfig.Certificates = []tls.Certificate{cert}
}
if h.Config.Cacert != "" {
caCert, err := ioutil.ReadFile(h.Config.Cacert)
caCert, err := os.ReadFile(h.Config.Cacert)
if err != nil {
return errors.Wrapf(err, "Fail to load the ca certificate")
}
Expand Down

0 comments on commit 00ccd8d

Please sign in to comment.