30 lines
490 B
Go
30 lines
490 B
Go
package cmd
|
|
|
|
import (
|
|
"excel_export/biz/config"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func init() {
|
|
rootCmd.AddCommand(systemCmd)
|
|
}
|
|
|
|
var systemCmd = &cobra.Command{
|
|
Use: "system",
|
|
Short: "支持的系统",
|
|
SilenceUsage: true,
|
|
SilenceErrors: true,
|
|
Run: systemRun,
|
|
}
|
|
|
|
func systemRun(cmd *cobra.Command, args []string) {
|
|
c := config.DefaultConfig
|
|
|
|
cmd.Println("支持的系统:")
|
|
for _, system := range c.Systems {
|
|
cmd.Printf("%s\n", system.Name)
|
|
}
|
|
return
|
|
|
|
}
|