pkg/daemon/action/connect-fork.go
Method Server.redirectConnectForkToSudoDaemon
has 81 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (svr *Server) redirectConnectForkToSudoDaemon(req *rpc.ConnectRequest, resp rpc.Daemon_ConnectServer) (err error) {
cli := svr.GetClient(true)
if cli == nil {
return fmt.Errorf("sudo daemon not start")
}
Method Server.ConnectFork
has 79 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (svr *Server) ConnectFork(req *rpc.ConnectRequest, resp rpc.Daemon_ConnectForkServer) (err error) {
defer func() {
util.InitLoggerForServer(true)
log.SetOutput(svr.LogFile)
config.Debug = false
Method Server.redirectConnectForkToSudoDaemon
has 13 return statements (exceeds 4 allowed). Open
Open
func (svr *Server) redirectConnectForkToSudoDaemon(req *rpc.ConnectRequest, resp rpc.Daemon_ConnectServer) (err error) {
cli := svr.GetClient(true)
if cli == nil {
return fmt.Errorf("sudo daemon not start")
}
Method Server.ConnectFork
has 11 return statements (exceeds 4 allowed). Open
Open
func (svr *Server) ConnectFork(req *rpc.ConnectRequest, resp rpc.Daemon_ConnectForkServer) (err error) {
defer func() {
util.InitLoggerForServer(true)
log.SetOutput(svr.LogFile)
config.Debug = false