feat: added 'profile' and 'plugins' flags
This commit is contained in:
parent
97fa0a1062
commit
4d33b12fe0
3 changed files with 16 additions and 0 deletions
|
|
@ -84,6 +84,8 @@ func init() {
|
|||
downloadCmd.Flags().StringVar(&host, "host", "http://localhost:5050", "Set the configurator remote host (can be set with CONFIGURATOR_HOST)")
|
||||
downloadCmd.Flags().StringVarP(&path, "path", "p", ".", "Set the path to list files (can be set with CONFIGURATOR_PATH)")
|
||||
downloadCmd.Flags().StringVarP(&outputPath, "output", "o", "", "Set the output path to write files")
|
||||
downloadCmd.Flags().StringVar(&profile, "profile", "", "Set the profile to use to populate data store")
|
||||
downloadCmd.Flags().StringSliceVar(&plugins, "plugins", []string{}, "Set the plugins to run before downloading files")
|
||||
|
||||
rootCmd.AddCommand(&downloadCmd)
|
||||
}
|
||||
|
|
|
|||
11
cmd/plugin.go
Normal file
11
cmd/plugin.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
package cmd
|
||||
|
||||
import "github.com/spf13/cobra"
|
||||
|
||||
var pluginCmd = &cobra.Command{}
|
||||
|
||||
var pluginCompileCmd = &cobra.Command{}
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(pluginCmd, pluginCompileCmd)
|
||||
}
|
||||
|
|
@ -17,8 +17,11 @@ var (
|
|||
outputPath string
|
||||
rootPath string
|
||||
logLevel string
|
||||
profile string
|
||||
plugins []string
|
||||
timeout int
|
||||
)
|
||||
|
||||
var rootCmd = cobra.Command{
|
||||
Use: "configurator",
|
||||
Short: "Extensible configuration builder to download files",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue