bisakhmondal commented on a change in pull request #1667:
URL: https://github.com/apache/apisix-dashboard/pull/1667#discussion_r616004229



##########
File path: api/cmd/managerapi.go
##########
@@ -69,85 +69,102 @@ func NewManagerAPICommand() *cobra.Command {
                                os.Exit(0)
                        }
 
-                       conf.InitConf()
-                       log.InitLogger()
-
-                       if err := utils.WritePID(conf.PIDPath); err != nil {
-                               log.Errorf("failed to write pid: %s", err)
-                               panic(err)
-                       }
-                       utils.AppendToClosers(func() error {
-                               if err := os.Remove(conf.PIDPath); err != nil {
-                                       log.Errorf("failed to remove pid path: 
%s", err)
-                                       return err
-                               }
-                               return nil
-                       })
-
-                       droplet.Option.Orchestrator = func(mws 
[]droplet.Middleware) []droplet.Middleware {
-                               var newMws []droplet.Middleware
-                               // default middleware order: resp_reshape, 
auto_input, traffic_log
-                               // We should put err_transform at second to 
catch all error
-                               newMws = append(newMws, mws[0], 
&handler.ErrorTransformMiddleware{}, &filter.AuthenticationMiddleware{})
-                               newMws = append(newMws, mws[1:]...)
-                               return newMws
+                       service, err := createService()
+                       if err != nil {
+                               return err
                        }
+                       status, err := service.manageService()
+                       fmt.Printf("%s\n", status)

Review comment:
       Hii, that's the formatted output after executing any commands ( the 
green  [  OK  ])




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to