bzp2010 commented on a change in pull request #1932:
URL: https://github.com/apache/apisix-dashboard/pull/1932#discussion_r647040701
##########
File path: api/cmd/root.go
##########
@@ -42,30 +42,23 @@ import (
)
var (
- showVersion bool
- Version string
- GitHash string
- service *Service
+ configFile string
)
-func printInfo() {
- fmt.Fprint(os.Stdout, "The manager-api is running successfully!\n\n")
- printVersion()
- fmt.Fprintf(os.Stdout, "%-8s: %s:%d\n", "Listen", conf.ServerHost,
conf.ServerPort)
- if conf.SSLCert != "" && conf.SSLKey != "" {
- fmt.Fprintf(os.Stdout, "%-8s: %s:%d\n", "HTTPS Listen",
conf.SSLHost, conf.SSLPort)
- }
- fmt.Fprintf(os.Stdout, "%-8s: %s\n", "Loglevel", conf.ErrorLogLevel)
- fmt.Fprintf(os.Stdout, "%-8s: %s\n\n", "Logfile", conf.ErrorLogPath)
-}
-
-func printVersion() {
- fmt.Fprintf(os.Stdout, "%-8s: %s\n", "Version", Version)
- fmt.Fprintf(os.Stdout, "%-8s: %s\n", "GitHash", GitHash)
+var rootCmd = &cobra.Command{
+ Use: "manager-api [flags]",
+ Short: "Apache APISIX Manager API",
Review comment:
@tokers
Here I create a new `serve` command. It allows us to run the Manager API
directly from the command line, rather than in the form of system services.
This is similar to the original root command.
The `RunE` part of the root command has been removed.
--
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]