From b4e39ae6f64f9dd79a392cd31b3cc20896a9acd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mindaugas=20=C5=BDvirblis?= Date: Wed, 11 Nov 2020 18:38:36 +0200 Subject: [PATCH 1/2] docs update --- docs/content/template/template-filters.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/docs/content/template/template-filters.md b/docs/content/template/template-filters.md index 407cf082..3ca9137d 100644 --- a/docs/content/template/template-filters.md +++ b/docs/content/template/template-filters.md @@ -76,7 +76,25 @@ weight: 20
- **parseYAML** -- Returns an interface{} of the yaml/json value. + **parseYAML** -- Returns an interface{} of the yaml value. + +``` +{% for value in getvs("/cache1/domains/*") %} +{% set data = value | parseYAML %} +{{ data.type }} {{ data.name }} {{ data.addr }} +{% endfor %} +``` +
+ +
+ **parseJSON** -- Returns an interface{} of the json value. + +``` +{% for value in getvs("/cache1/domains/*") %} +{% set data = value | parseJSON %} +{{ data.type }} {{ data.name }} {{ data.addr }} +{% endfor %} +```
From 476e2423eb11f697db00acd06ef2223973a756eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mindaugas=20=C5=BDvirblis?= Date: Wed, 11 Nov 2020 18:39:10 +0200 Subject: [PATCH 2/2] dockerfile --- Dockerfile | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..c6f4eab5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM golang:buster AS build + +WORKDIR /src +COPY . . +RUN make + +FROM scratch AS bin +COPY --from=build /src/bin/remco /remco +