aboutsummaryrefslogtreecommitdiff
path: root/hotline/server.go
diff options
context:
space:
mode:
authorJeff Halter <868228+jhalter@users.noreply.github.com>2023-04-19 17:00:12 -0700
committerJeff Halter <868228+jhalter@users.noreply.github.com>2023-04-19 17:00:12 -0700
commit7152b7e59b6e30d3025cf5c6386eb2e54b95c139 (patch)
treeec3410fee2709163ee97744ebad63eda6f814ca8 /hotline/server.go
parent22c5767f56b55b0327d9ea75a964abf95c684794 (diff)
Replace deprecated iotuil usage
Diffstat (limited to 'hotline/server.go')
-rw-r--r--hotline/server.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/hotline/server.go b/hotline/server.go
index f4a2ad4..a3508b2 100644
--- a/hotline/server.go
+++ b/hotline/server.go
@@ -11,7 +11,6 @@ import (
"gopkg.in/yaml.v3"
"io"
"io/fs"
- "io/ioutil"
"math/big"
"math/rand"
"net"
@@ -339,7 +338,7 @@ func (s *Server) writeBanList() error {
if err != nil {
return err
}
- err = ioutil.WriteFile(
+ err = os.WriteFile(
filepath.Join(s.ConfigDir, "Banlist.yaml"),
out,
0666,
@@ -1210,7 +1209,7 @@ func (s *Server) handleFileTransfer(ctx context.Context, rwc io.ReadWriter) erro
return err
}
- if err := receiveFile(rwc, file, ioutil.Discard, ioutil.Discard, fileTransfer.bytesSentCounter); err != nil {
+ if err := receiveFile(rwc, file, io.Discard, io.Discard, fileTransfer.bytesSentCounter); err != nil {
s.Logger.Error(err)
}