Skip to content

Commit 6b0f77c

Browse files
committed
Removed deprecated io/ioutil with os
1 parent 01fc6e5 commit 6b0f77c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

go/chisel/server/server_handler.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import (
44
"context"
55
"encoding/json"
66
"fmt"
7-
"io/ioutil"
87
"net"
98
"net/http"
9+
"os"
1010
"strings"
1111
"sync"
1212
"sync/atomic"
@@ -179,7 +179,6 @@ func (s *Server) handleWebsocket(w http.ResponseWriter, req *http.Request) {
179179
localSecret := pfconfigdriver.LocalSecret{}
180180
pfconfigdriver.FetchDecodeSocket(req.Context(), &localSecret)
181181

182-
//
183182
//successfuly validated config!
184183
r.Reply(true, nil)
185184
//tunnel per ssh connection
@@ -495,7 +494,7 @@ func (s *Server) handleRemoteFingerbankCollectorEnv(w http.ResponseWriter, req *
495494
}
496495

497496
func (s *Server) handleRemoteFingerbankCollectorNbaConf(w http.ResponseWriter, req *http.Request) {
498-
if nbaConf, err := ioutil.ReadFile("/usr/local/pf/conf/network_behavior_policies.conf"); err == nil {
497+
if nbaConf, err := os.ReadFile("/usr/local/pf/conf/network_behavior_policies.conf"); err == nil {
499498
w.Write(nbaConf)
500499
} else {
501500
log.LoggerWContext(req.Context()).Error(fmt.Sprintf("Error while reading Fingerbank NBA config: %s", err))

0 commit comments

Comments
 (0)