From deeb86fad7864d6216c1b10f52b2ea4d31435123 Mon Sep 17 00:00:00 2001 From: Dave Henderson Date: Sun, 16 Jun 2024 17:55:29 -0400 Subject: feat: Add ability to override 'type' query parameter name (#2115) Signed-off-by: Dave Henderson --- docs/content/datasources.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'docs/content/datasources.md') 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. -- cgit v1.2.3