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 StcpProxy struct {
type STCPProxy struct {
*BaseProxy
cfg *config.StcpProxyConf
cfg *config.STCPProxyConf
}
func (pxy *StcpProxy) Run() (remoteAddr string, err error) {
func (pxy *STCPProxy) Run() (remoteAddr string, err error) {
xl := pxy.xl
listener, errRet := pxy.rc.VisitorManager.Listen(pxy.GetName(), pxy.cfg.Sk)
if errRet != nil {
@ -33,15 +33,15 @@ func (pxy *StcpProxy) Run() (remoteAddr string, err error) {
pxy.listeners = append(pxy.listeners, listener)
xl.Info("stcp proxy custom listen success")
pxy.startListenHandler(pxy, HandleUserTcpConnection)
pxy.startListenHandler(pxy, HandleUserTCPConnection)
return
}
func (pxy *StcpProxy) GetConf() config.ProxyConf {
func (pxy *STCPProxy) GetConf() config.ProxyConf {
return pxy.cfg
}
func (pxy *StcpProxy) Close() {
func (pxy *STCPProxy) Close() {
pxy.BaseProxy.Close()
pxy.rc.VisitorManager.CloseListener(pxy.GetName())
}