package tree import ( "github.com/spf13/cobra" ) var Cmd = &cobra.Command{ Use: "tree", Short: "Operations with the Tree service", } func init() { Cmd.AddCommand(addCmd) initAddCmd() } const ( containerIDFlagKey = "cid" treeIDFlagKey = "tid" parentIDFlagKey = "pid" metaFlagKey = "meta" ) func initCTID(cmd *cobra.Command) { ff := cmd.Flags() ff.String(containerIDFlagKey, "", "Container ID") _ = cmd.MarkFlagRequired(containerIDFlagKey) ff.String(treeIDFlagKey, "", "Tree ID") _ = cmd.MarkFlagRequired(treeIDFlagKey) }