fix(cmd): rename flag to last-win
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
c50c0a835e
commit
cadf25b089
@ -42,7 +42,7 @@ dcmerge docker-compose.yml https://git.example.local/user/repo/docker-compose.ym
|
|||||||
RunE: run,
|
RunE: run,
|
||||||
Version: version,
|
Version: version,
|
||||||
}
|
}
|
||||||
rootCmd.Flags().BoolP("last-merge", "l", false, "Overwrite existing attributes")
|
rootCmd.Flags().BoolP("last-win", "l", false, "Overwrite existing attributes")
|
||||||
rootCmd.Flags().BoolP("output-file", "o", false, "Write instead on stdout into a file")
|
rootCmd.Flags().BoolP("output-file", "o", false, "Write instead on stdout into a file")
|
||||||
rootCmd.AddCommand(completionCmd)
|
rootCmd.AddCommand(completionCmd)
|
||||||
|
|
||||||
@ -50,9 +50,9 @@ dcmerge docker-compose.yml https://git.example.local/user/repo/docker-compose.ym
|
|||||||
}
|
}
|
||||||
|
|
||||||
func run(cmd *cobra.Command, args []string) error {
|
func run(cmd *cobra.Command, args []string) error {
|
||||||
mergeLastWin, err := cmd.Flags().GetBool("last-merge")
|
mergeLastWin, err := cmd.Flags().GetBool("last-win")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("Failed to parse flag last-merge: %s", err)
|
return fmt.Errorf("Failed to parse flag last-win: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
outputFile, err := cmd.Flags().GetString("output-file")
|
outputFile, err := cmd.Flags().GetString("output-file")
|
||||||
|
Loading…
Reference in New Issue
Block a user