Skip to content

Commit

Permalink
Removed deprecated io/ioutil with os
Browse files Browse the repository at this point in the history
  • Loading branch information
fdurand committed Mar 7, 2025
1 parent 01fc6e5 commit 6b0f77c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions go/chisel/server/server_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"net"
"net/http"
"os"
"strings"
"sync"
"sync/atomic"
Expand Down Expand Up @@ -179,7 +179,6 @@ func (s *Server) handleWebsocket(w http.ResponseWriter, req *http.Request) {
localSecret := pfconfigdriver.LocalSecret{}
pfconfigdriver.FetchDecodeSocket(req.Context(), &localSecret)

//
//successfuly validated config!
r.Reply(true, nil)
//tunnel per ssh connection
Expand Down Expand Up @@ -495,7 +494,7 @@ func (s *Server) handleRemoteFingerbankCollectorEnv(w http.ResponseWriter, req *
}

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

0 comments on commit 6b0f77c

Please sign in to comment.