diff options
| author | Dave Henderson <dhenderson@gmail.com> | 2018-11-12 23:22:06 -0500 |
|---|---|---|
| committer | Dave Henderson <dhenderson@gmail.com> | 2018-11-15 13:40:17 -0500 |
| commit | 6056ca97d889fb268cc287334bc644e6b6d487d7 (patch) | |
| tree | 70c877188224219bb94d6b1c98894e53daf02497 /cmd | |
| parent | 79b79c1db7652ba763f0186360e92da7f4b30fbd (diff) | |
New --context flag for adding datasources to context
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/gomplate/main.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd/gomplate/main.go b/cmd/gomplate/main.go index a40c6f0c..46c4dfa5 100644 --- a/cmd/gomplate/main.go +++ b/cmd/gomplate/main.go @@ -113,6 +113,8 @@ func initFlags(command *cobra.Command) { command.Flags().StringArrayVarP(&opts.DataSources, "datasource", "d", nil, "`datasource` in alias=URL form. Specify multiple times to add multiple sources.") command.Flags().StringArrayVarP(&opts.DataSourceHeaders, "datasource-header", "H", nil, "HTTP `header` field in 'alias=Name: value' form to be provided on HTTP-based data sources. Multiples can be set.") + command.Flags().StringArrayVarP(&opts.Contexts, "context", "c", nil, "pre-load a `datasource` into the context, in alias=URL form. Use the special alias `.` to set the root context.") + command.Flags().StringArrayVarP(&opts.InputFiles, "file", "f", []string{"-"}, "Template `file` to process. Omit to use standard input, or use --in or --input-dir") command.Flags().StringVarP(&opts.Input, "in", "i", "", "Template `string` to process (alternative to --file and --input-dir)") command.Flags().StringVar(&opts.InputDir, "input-dir", "", "`directory` which is examined recursively for templates (alternative to --file and --in)") |
