add multiple env vars to templates

This commit is contained in:
Willy Kloucek
2020-12-23 09:19:32 +01:00
parent 352034d9eb
commit 12897e61cb
13 changed files with 40 additions and 14 deletions
+3 -1
View File
@@ -11,7 +11,7 @@ geekdocFilePath: CONFIGURATION.tmpl
{{ range $opt := first . }}{{ with list $fnName $opt -}}
{{ $o := last . -}}
{{ if eq $o.FnName $fnName -}}
--{{ $o.Name }} | ${{ index $o.Env 0 }}
-{{ $o.Name }} | {{ range $i, $e := $o.Env }} {{ if $i }}, {{ end }}${{ $e }}{{ end }}
: {{ $o.Usage }}. {{- if $o.Default }} Default: `{{ $o.Default }}`.{{ end }}
{{ end -}}
@@ -41,6 +41,8 @@ So far we support the file formats `JSON` and `YAML`, if you want to get a full
If you prefer to configure the service with environment variables you can see the available variables below.
If multiple variables are listed for one option, they are in order of precedence. This means the leftmost variable will always win if given.
### Commandline flags
If you prefer to configure the service with commandline flags you can see the available variables below. Command line flags are only working when calling the subcommand directly.
+3 -1
View File
@@ -11,7 +11,7 @@ geekdocFilePath: CONFIGURATION.tmpl
{{ range $opt := first . }}{{ with list $fnName $opt -}}
{{ $o := last . -}}
{{ if eq $o.FnName $fnName -}}
--{{ $o.Name }} | ${{ index $o.Env 0 }}
-{{ $o.Name }} | {{ range $i, $e := $o.Env }} {{ if $i }}, {{ end }}${{ $e }}{{ end }}
: {{ $o.Usage }}. {{- if $o.Default }} Default: `{{ $o.Default }}`.{{ end }}
{{ end -}}
@@ -41,6 +41,8 @@ So far we support the file formats `JSON` and `YAML`, if you want to get a full
If you prefer to configure the service with environment variables you can see the available variables below.
If multiple variables are listed for one option, they are in order of precedence. This means the leftmost variable will always win if given.
### Commandline flags
If you prefer to configure the service with commandline flags you can see the available variables below. Command line flags are only working when calling the subcommand directly.
+3 -1
View File
@@ -11,7 +11,7 @@ geekdocFilePath: CONFIGURATION.tmpl
{{ range $opt := first . }}{{ with list $fnName $opt -}}
{{ $o := last . -}}
{{ if eq $o.FnName $fnName -}}
--{{ $o.Name }} | ${{ index $o.Env 0 }}
-{{ $o.Name }} | {{ range $i, $e := $o.Env }} {{ if $i }}, {{ end }}${{ $e }}{{ end }}
: {{ $o.Usage }}. {{- if $o.Default }} Default: `{{ $o.Default }}`.{{ end }}
{{ end -}}
@@ -41,6 +41,8 @@ So far we support the file formats `JSON` and `YAML`, if you want to get a full
If you prefer to configure the service with environment variables you can see the available variables below.
If multiple variables are listed for one option, they are in order of precedence. This means the leftmost variable will always win if given.
### Commandline flags
If you prefer to configure the service with commandline flags you can see the available variables below. Command line flags are only working when calling the subcommand directly.
+3 -1
View File
@@ -11,7 +11,7 @@ geekdocFilePath: CONFIGURATION.tmpl
{{ range $opt := first . }}{{ with list $fnName $opt -}}
{{ $o := last . -}}
{{ if eq $o.FnName $fnName -}}
--{{ $o.Name }} | ${{ index $o.Env 0 }}
-{{ $o.Name }} | {{ range $i, $e := $o.Env }} {{ if $i }}, {{ end }}${{ $e }}{{ end }}
: {{ $o.Usage }}. {{- if $o.Default }} Default: `{{ $o.Default }}`.{{ end }}
{{ end -}}
@@ -45,6 +45,8 @@ So far we support the file formats `JSON` and `YAML`, if you want to get a full
If you prefer to configure the service with environment variables you can see the available variables below.
If multiple variables are listed for one option, they are in order of precedence. This means the leftmost variable will always win if given.
### Commandline flags
If you prefer to configure the service with commandline flags you can see the available variables below. Command line flags are only working when calling the subcommand directly.
+3 -1
View File
@@ -11,7 +11,7 @@ geekdocFilePath: CONFIGURATION.tmpl
{{ range $opt := first . }}{{ with list $fnName $opt -}}
{{ $o := last . -}}
{{ if eq $o.FnName $fnName -}}
--{{ $o.Name }} | ${{ index $o.Env 0 }}
-{{ $o.Name }} | {{ range $i, $e := $o.Env }} {{ if $i }}, {{ end }}${{ $e }}{{ end }}
: {{ $o.Usage }}. {{- if $o.Default }} Default: `{{ $o.Default }}`.{{ end }}
{{ end -}}
@@ -41,6 +41,8 @@ So far we support the file formats `JSON` and `YAML`, if you want to get a full
If you prefer to configure the service with environment variables you can see the available variables below.
If multiple variables are listed for one option, they are in order of precedence. This means the leftmost variable will always win if given.
### Commandline flags
If you prefer to configure the service with commandline flags you can see the available variables below. Command line flags are only working when calling the subcommand directly.
+3 -1
View File
@@ -11,7 +11,7 @@ geekdocFilePath: CONFIGURATION.tmpl
{{ range $opt := first . }}{{ with list $fnName $opt -}}
{{ $o := last . -}}
{{ if eq $o.FnName $fnName -}}
--{{ $o.Name }} | ${{ index $o.Env 0 }}
-{{ $o.Name }} | {{ range $i, $e := $o.Env }} {{ if $i }}, {{ end }}${{ $e }}{{ end }}
: {{ $o.Usage }}. {{- if $o.Default }} Default: `{{ $o.Default }}`.{{ end }}
{{ end -}}
@@ -45,6 +45,8 @@ So far we support the file formats `JSON` and `YAML`, if you want to get a full
If you prefer to configure the service with environment variables you can see the available variables below.
If multiple variables are listed for one option, they are in order of precedence. This means the leftmost variable will always win if given.
### Commandline flags
If you prefer to configure the service with commandline flags you can see the available variables below. Command line flags are only working when calling the subcommand directly.
+3 -1
View File
@@ -11,7 +11,7 @@ geekdocFilePath: CONFIGURATION.tmpl
{{ range $opt := first . }}{{ with list $fnName $opt -}}
{{ $o := last . -}}
{{ if eq $o.FnName $fnName -}}
--{{ $o.Name }} | ${{ index $o.Env 0 }}
--{{ $o.Name }} | {{ range $i, $e := $o.Env }} {{ if $i }}, {{ end }}${{ $e }}{{ end }}
: {{ $o.Usage }}. {{- if $o.Default }} Default: `{{ $o.Default }}`.{{ end }}
{{ end -}}
@@ -41,6 +41,8 @@ So far we support the file formats `JSON` and `YAML`, if you want to get a full
If you prefer to configure the service with environment variables you can see the available variables below.
If multiple variables are listed for one option, they are in order of precedence. This means the leftmost variable will always win if given.
### Commandline flags
If you prefer to configure the service with commandline flags you can see the available variables below. Command line flags are only working when calling the subcommand directly.
+3 -1
View File
@@ -11,7 +11,7 @@ geekdocFilePath: CONFIGURATION.tmpl
{{ range $opt := first . }}{{ with list $fnName $opt -}}
{{ $o := last . -}}
{{ if eq $o.FnName $fnName -}}
--{{ $o.Name }} | ${{ index $o.Env 0 }}
-{{ $o.Name }} | {{ range $i, $e := $o.Env }} {{ if $i }}, {{ end }}${{ $e }}{{ end }}
: {{ $o.Usage }}. {{- if $o.Default }} Default: `{{ $o.Default }}`.{{ end }}
{{ end -}}
@@ -41,6 +41,8 @@ So far we support the file formats `JSON` and `YAML`, if you want to get a full
If you prefer to configure the service with environment variables you can see the available variables below.
If multiple variables are listed for one option, they are in order of precedence. This means the leftmost variable will always win if given.
### Commandline flags
If you prefer to configure the service with commandline flags you can see the available variables below. Command line flags are only working when calling the subcommand directly.
+4 -2
View File
@@ -11,7 +11,7 @@ geekdocFilePath: CONFIGURATION.tmpl
{{ range $opt := first . }}{{ with list $fnName $opt -}}
{{ $o := last . -}}
{{ if eq $o.FnName $fnName -}}
--{{ $o.Name }} | ${{ index $o.Env 0 }}
-{{ $o.Name }} | {{ range $i, $e := $o.Env }} {{ if $i }}, {{ end }}${{ $e }}{{ end }}
: {{ $o.Usage }}. {{- if $o.Default }} Default: `{{ $o.Default }}`.{{ end }}
{{ end -}}
@@ -24,7 +24,7 @@ geekdocFilePath: CONFIGURATION.tmpl
{{- range $o := $options }}{{ with (list $o $oName) -}}
{{- $o := first . }}
{{- if eq $o.FnName (last .) -}}
--{{ $o.Name }} | ${{ index $o.Env 0 }}
-{{ $o.Name }} | {{ range $i, $e := $o.Env }} {{ if $i }}, {{ end }}${{ $e }}{{ end }}
: {{ $o.Usage }}. {{- if $o.Default }} Default: `{{ $o.Default }}`.{{ end }}
{{ end -}}
@@ -54,6 +54,8 @@ So far we support the file formats `JSON` and `YAML`, if you want to get a full
If you prefer to configure the service with environment variables you can see the available variables below.
If multiple variables are listed for one option, they are in order of precedence. This means the leftmost variable will always win if given.
### Commandline flags
If you prefer to configure the service with commandline flags you can see the available variables below. Command line flags are only working when calling the subcommand directly.
+3 -1
View File
@@ -11,7 +11,7 @@ geekdocFilePath: CONFIGURATION.tmpl
{{ range $opt := first . }}{{ with list $fnName $opt -}}
{{ $o := last . -}}
{{ if eq $o.FnName $fnName -}}
--{{ $o.Name }} | ${{ index $o.Env 0 }}
-{{ $o.Name }} | {{ range $i, $e := $o.Env }} {{ if $i }}, {{ end }}${{ $e }}{{ end }}
: {{ $o.Usage }}. {{- if $o.Default }} Default: `{{ $o.Default }}`.{{ end }}
{{ end -}}
@@ -41,6 +41,8 @@ So far we support the file formats `JSON` and `YAML`, if you want to get a full
If you prefer to configure the service with environment variables you can see the available variables below.
If multiple variables are listed for one option, they are in order of precedence. This means the leftmost variable will always win if given.
### Commandline flags
If you prefer to configure the service with commandline flags you can see the available variables below. Command line flags are only working when calling the subcommand directly.
+3 -1
View File
@@ -11,7 +11,7 @@ geekdocFilePath: CONFIGURATION.tmpl
{{ range $opt := first . }}{{ with list $fnName $opt -}}
{{ $o := last . -}}
{{ if eq $o.FnName $fnName -}}
--{{ $o.Name }} | ${{ index $o.Env 0 }}
-{{ $o.Name }} | {{ range $i, $e := $o.Env }} {{ if $i }}, {{ end }}${{ $e }}{{ end }}
: {{ $o.Usage }}. {{- if $o.Default }} Default: `{{ $o.Default }}`.{{ end }}
{{ end -}}
@@ -41,6 +41,8 @@ So far we support the file formats `JSON` and `YAML`, if you want to get a full
If you prefer to configure the service with environment variables you can see the available variables below.
If multiple variables are listed for one option, they are in order of precedence. This means the leftmost variable will always win if given.
### Commandline flags
If you prefer to configure the service with commandline flags you can see the available variables below. Command line flags are only working when calling the subcommand directly.
+3 -1
View File
@@ -11,7 +11,7 @@ geekdocFilePath: CONFIGURATION.tmpl
{{ range $opt := first . }}{{ with list $fnName $opt -}}
{{ $o := last . -}}
{{ if eq $o.FnName $fnName -}}
--{{ $o.Name }} | ${{ index $o.Env 0 }}
-{{ $o.Name }} | {{ range $i, $e := $o.Env }} {{ if $i }}, {{ end }}${{ $e }}{{ end }}
: {{ $o.Usage }}. {{- if $o.Default }} Default: `{{ $o.Default }}`.{{ end }}
{{ end -}}
@@ -41,6 +41,8 @@ So far we support the file formats `JSON` and `YAML`, if you want to get a full
If you prefer to configure the service with environment variables you can see the available variables below.
If multiple variables are listed for one option, they are in order of precedence. This means the leftmost variable will always win if given.
### Commandline flags
If you prefer to configure the service with commandline flags you can see the available variables below. Command line flags are only working when calling the subcommand directly.
+3 -1
View File
@@ -11,7 +11,7 @@ geekdocFilePath: CONFIGURATION.tmpl
{{ range $opt := first . }}{{ with list $fnName $opt -}}
{{ $o := last . -}}
{{ if eq $o.FnName $fnName -}}
--{{ $o.Name }} | ${{ index $o.Env 0 }}
-{{ $o.Name }} | {{ range $i, $e := $o.Env }} {{ if $i }}, {{ end }}${{ $e }}{{ end }}
: {{ $o.Usage }}. {{- if $o.Default }} Default: `{{ $o.Default }}`.{{ end }}
{{ end -}}
@@ -41,6 +41,8 @@ So far we support the file formats `JSON` and `YAML`, if you want to get a full
If you prefer to configure the service with environment variables you can see the available variables below.
If multiple variables are listed for one option, they are in order of precedence. This means the leftmost variable will always win if given.
### Commandline flags
If you prefer to configure the service with commandline flags you can see the available variables below. Command line flags are only working when calling the subcommand directly.