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