|
6 | 6 |
|
7 | 7 | "github.com/fsnotify/fsnotify" |
8 | 8 | "github.com/mongodb-labs/atlas-cli-plugin-terraform/internal/file" |
9 | | - "github.com/mongodb-labs/atlas-cli-plugin-terraform/internal/flag" |
| 9 | + "github.com/mongodb-labs/atlas-cli-plugin-terraform/internal/flags" |
10 | 10 | "github.com/spf13/afero" |
11 | 11 | "github.com/spf13/cobra" |
12 | 12 | ) |
@@ -119,12 +119,12 @@ func (o *BaseOpts) waitForFileEvent(watcher *fsnotify.Watcher) error { |
119 | 119 |
|
120 | 120 | // SetupCommonFlags sets up the common flags used by all commands. |
121 | 121 | func SetupCommonFlags(cmd *cobra.Command, opts *BaseOpts) { |
122 | | - cmd.Flags().StringVarP(&opts.File, flag.File, flag.FileShort, "", "input file") |
123 | | - _ = cmd.MarkFlagRequired(flag.File) |
124 | | - cmd.Flags().StringVarP(&opts.Output, flag.Output, flag.OutputShort, "", "output file") |
125 | | - _ = cmd.MarkFlagRequired(flag.Output) |
126 | | - cmd.Flags().BoolVarP(&opts.ReplaceOutput, flag.ReplaceOutput, flag.ReplaceOutputShort, false, |
| 122 | + cmd.Flags().StringVarP(&opts.File, flags.File, flags.FileShort, "", "input file") |
| 123 | + _ = cmd.MarkFlagRequired(flags.File) |
| 124 | + cmd.Flags().StringVarP(&opts.Output, flags.Output, flags.OutputShort, "", "output file") |
| 125 | + _ = cmd.MarkFlagRequired(flags.Output) |
| 126 | + cmd.Flags().BoolVarP(&opts.ReplaceOutput, flags.ReplaceOutput, flags.ReplaceOutputShort, false, |
127 | 127 | "replace output file if exists") |
128 | | - cmd.Flags().BoolVarP(&opts.Watch, flag.Watch, flag.WatchShort, false, |
| 128 | + cmd.Flags().BoolVarP(&opts.Watch, flags.Watch, flags.WatchShort, false, |
129 | 129 | "keeps the plugin running and watches the input file for changes") |
130 | 130 | } |
0 commit comments