From 1a8d5bf338113a60f7435a7f6b8ea7db0d7c0f32 Mon Sep 17 00:00:00 2001 From: Dave Henderson Date: Tue, 23 May 2017 23:49:08 -0400 Subject: Hugoizing doc site Signed-off-by: Dave Henderson --- docs/content/syntax.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 docs/content/syntax.md (limited to 'docs/content/syntax.md') diff --git a/docs/content/syntax.md b/docs/content/syntax.md new file mode 100644 index 00000000..0b092087 --- /dev/null +++ b/docs/content/syntax.md @@ -0,0 +1,15 @@ +--- +title: Syntax +weight: 0 +--- + +## About `.Env` + +You can easily access environment variables with `.Env`, but there's a catch: +if you try to reference an environment variable that doesn't exist, parsing +will fail and `gomplate` will exit with an error condition. + +Sometimes, this behaviour is desired; if the output is unusable without certain +strings, this is a sure way to know that variables are missing! + +If you want different behaviour, try [`getenv`](../functions/#getenv). -- cgit v1.2.3