func Handle(request *pb.Request, response *pb.Response, conn *Connection) error { module := request.GetModule() handler, ok := handlers[module] if !ok { response = &pb.Response{Code: pb.Code_MODULE_NOT_EXIST.Enum()} Log.Alertf("%v request not exist module %v with %v", conn.Conn.RemoteAddr(), module, request) return nil } return handler.Handle(request, response, conn) }