diff options
| author | Dave Henderson <dhenderson@gmail.com> | 2024-06-16 17:55:29 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-16 21:55:29 +0000 |
| commit | deeb86fad7864d6216c1b10f52b2ea4d31435123 (patch) | |
| tree | 5c9988b8f81f9f6fa07b64a7d0cd715eadf76b3d /docs/content/datasources.md | |
| parent | 33168dbb4d2080a49899f56576582c10d3f02c3b (diff) | |
feat: Add ability to override 'type' query parameter name (#2115)
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'docs/content/datasources.md')
| -rw-r--r-- | docs/content/datasources.md | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/content/datasources.md b/docs/content/datasources.md index 3782b427..351b1a50 100644 --- a/docs/content/datasources.md +++ b/docs/content/datasources.md @@ -127,6 +127,13 @@ $ gomplate -d data=file:///tmp/data.txt?type=application/json -i '{{ (ds "data") bar ``` +If you need to provide a query parameter named `type` to the data source, set the `GOMPLATE_TYPE_PARAM` environment variable to another value: + +```console +$ GOMPLATE_TYPE_PARAM=content-type gomplate -d data=https://example.com/mydata?content-type=application/json -i '{{ (ds "data").foo }}' +bar +``` + ### The `.env` file format Many applications and frameworks support the use of a ".env" file for providing environment variables. It can also be considerd a simple key/value file format, and as such can be used as a datasource in gomplate. |
