Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AddCmd = &cobra.Command{ Use: "add -t Type -n Name [filename]...", Short: "Add metadata item to package.xml", DisableFlagsInUseLine: true, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { for _, file := range args { add(file, metadataType, name) } }, }
View Source
var DeleteCmd = &cobra.Command{ Use: "delete -t Type -n Name [filename]...", Short: "Remove metadata item from package.xml", DisableFlagsInUseLine: true, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { for _, file := range args { deleteMember(file, metadataType, name) } }, }
View Source
var ListCmd = &cobra.Command{ Use: "list [filename]...", Short: "list items in package.xml", DisableFlagsInUseLine: true, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { for _, file := range args { listMembers(file) } }, }
View Source
var NewCmd = &cobra.Command{ Use: "new [filename]...", Short: "Create new package.xml file", DisableFlagsInUseLine: true, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { for _, file := range args { createFile(file) } }, }
View Source
var TidyCmd = &cobra.Command{ Use: "tidy [filename]...", Short: "Tidy package.xml", DisableFlagsInUseLine: true, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { changes := false for _, file := range args { list, _ := cmd.Flags().GetBool("list") if list { needsTidying := checkIfChanged(file) changes = needsTidying || changes } else { tidy(file) } } if changes { os.Exit(1) } }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.