docs: add some desc for export command

This commit is contained in:
mzz2017
2023-03-22 22:06:40 +08:00
parent 28cf3adbd2
commit f284322d9b
2 changed files with 6 additions and 4 deletions

View File

@ -7,19 +7,21 @@ package cmd
import ( import (
"fmt" "fmt"
"github.com/spf13/cobra"
"github.com/daeuniverse/dae/config" "github.com/daeuniverse/dae/config"
"github.com/spf13/cobra"
) )
var ( var (
exportCmd = &cobra.Command{ exportCmd = &cobra.Command{
Use: "export", Use: "export",
Short: "To export some information for UI developers.",
Run: func(cmd *cobra.Command, args []string) { Run: func(cmd *cobra.Command, args []string) {
_ = cmd.Help() _ = cmd.Help()
}, },
} }
exportOutlineCmd = &cobra.Command{ exportOutlineCmd = &cobra.Command{
Use: "outline", Use: "outline",
Short: "To export config structure.",
Run: func(cmd *cobra.Command, args []string) { Run: func(cmd *cobra.Command, args []string) {
fmt.Println(config.ExportOutlineJson(Version)) fmt.Println(config.ExportOutlineJson(Version))
}, },

View File

@ -14,7 +14,7 @@ import (
var ( var (
validateCmd = &cobra.Command{ validateCmd = &cobra.Command{
Use: "validate", Use: "validate",
Short: "To validating dae config.", Short: "To validate dae config.",
Run: func(cmd *cobra.Command, args []string) { Run: func(cmd *cobra.Command, args []string) {
if cfgFile == "" { if cfgFile == "" {
fmt.Println("Argument \"--config\" or \"-c\" is required but not provided.") fmt.Println("Argument \"--config\" or \"-c\" is required but not provided.")