12345678910111213141516171819202122232425 |
- package cmd
- import (
- "fmt"
- "github.com/spf13/cobra"
- "ppgo/common"
- )
- var CommandCmd = &cobra.Command{
- Use: "cmd",
- Short: "run a cmd",
- Long: `run a cmd`,
- Run: RunCmd,
- }
- func init() {
- RootCmd.AddCommand(CommandCmd)
- }
- func RunCmd(cmd *cobra.Command, args []string) {
- c := common.GetConfig()
- fmt.Printf("%+v", c)
- }
|