refactor: move from io/ioutil to io and os package (#2592)

This commit is contained in:
kekeimiku
2021-09-29 10:33:57 +08:00
committed by GitHub
parent 72a7fd948e
commit 0cee1877e3
19 changed files with 38 additions and 44 deletions

View File

@@ -19,7 +19,7 @@ import (
"context"
"crypto/tls"
"fmt"
"io/ioutil"
"io"
"net"
"net/http"
"sort"
@@ -406,7 +406,7 @@ func (svr *Service) HandleListener(l net.Listener) {
if svr.cfg.TCPMux {
fmuxCfg := fmux.DefaultConfig()
fmuxCfg.KeepAliveInterval = 20 * time.Second
fmuxCfg.LogOutput = ioutil.Discard
fmuxCfg.LogOutput = io.Discard
session, err := fmux.Server(frpConn, fmuxCfg)
if err != nil {
log.Warn("Failed to create mux connection: %v", err)