You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/06/08 03:25:23 UTC

[GitHub] [apisix-dashboard] bzp2010 commented on pull request #1932: feat: split cmd package code

bzp2010 commented on pull request #1932:
URL: https://github.com/apache/apisix-dashboard/pull/1932#issuecomment-856408676


   ### Change progress
   - [x] split `managerapi.go` to multiple files in `cmd` packages
   - [x] move `./cmd/manager/main.go` to `./main.go`
   - [x] change github workflows and test script's golang source path
   - [x] optimize imported libraries
   
   ### About root command's `RunE` (Indicated by the review of @tokers)
   Due to various tests, the deployment script still relies on the `RunE` code in the root command. I restored some of the changes, such as the added `serve` command. For the following reasons.
   
   > When I read some of the command code introduced by the previous PR, I realized that when we introduce a new command, we should design it carefully. Such as the built-in daemon code, it uses some syscalls and destroys the compatibility of the operating system.
   > 
   > (When using Windows, we cannot use `syscall.Kill`. Although we may not use Windows in the deployment environment, we still need to ensure the operating system compatibility provided by golang as much as possible.)
   >
   > By the way, I think it's necessary to use `systemd` or `supervisor` to implement operating system daemons instead of built-in command, which brings unnecessary complexity.
   
   ### Final things
   Currently, only a few updates have been made to PR, and no incompatible updates have been introduced.


-- 
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:
users@infra.apache.org