bzp2010 commented on a change in pull request #1932:
URL: https://github.com/apache/apisix-dashboard/pull/1932#discussion_r645957623
##########
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 This part completely refers to the code segment of the original
root command and has not been modified. Should I delete it?
Part of the code is compatible with `-v` to get the version information.
--
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]