fix by golint (#1822)

This commit is contained in:
fatedier
2020-05-24 17:48:37 +08:00
committed by GitHub
parent 2170c481ce
commit 8b75b8b837
80 changed files with 1315 additions and 1324 deletions

View File

@@ -18,12 +18,12 @@ import (
"github.com/fatedier/frp/models/config"
)
type SudpProxy struct {
type SUDPProxy struct {
*BaseProxy
cfg *config.SudpProxyConf
cfg *config.SUDPProxyConf
}
func (pxy *SudpProxy) Run() (remoteAddr string, err error) {
func (pxy *SUDPProxy) Run() (remoteAddr string, err error) {
xl := pxy.xl
listener, errRet := pxy.rc.VisitorManager.Listen(pxy.GetName(), pxy.cfg.Sk)
@@ -34,15 +34,15 @@ func (pxy *SudpProxy) Run() (remoteAddr string, err error) {
pxy.listeners = append(pxy.listeners, listener)
xl.Info("sudp proxy custom listen success")
pxy.startListenHandler(pxy, HandleUserTcpConnection)
pxy.startListenHandler(pxy, HandleUserTCPConnection)
return
}
func (pxy *SudpProxy) GetConf() config.ProxyConf {
func (pxy *SUDPProxy) GetConf() config.ProxyConf {
return pxy.cfg
}
func (pxy *SudpProxy) Close() {
func (pxy *SUDPProxy) Close() {
pxy.BaseProxy.Close()
pxy.rc.VisitorManager.CloseListener(pxy.GetName())
}