Skip to content

Commit eac6cfd

Browse files
committed
Add sprig documentation
1 parent a8d23a7 commit eac6cfd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,13 @@ this based on the source file name.
7070

7171
### Example with golang templates
7272

73+
Withing the template there are [Template functions available from Sprig](https://masterminds.github.io/sprig/).
74+
7375
Configuration file `daemon.conf.tmpl`:
7476
```
7577
<VirtualHost ...>
76-
ServerName {{.Env.SERVERNAME}}
77-
DocumentRoot {{.Env.DOCUMENTROOT}}
78+
ServerName {{env "SERVERNAME"}}
79+
DocumentRoot {{env "DOCUMENTROOT"}}
7880
<VirtualHost>
7981
8082
```
@@ -93,7 +95,6 @@ Reuslt file `daemon.conf`:
9395
ServerName www.foobar.example
9496
DocumentRoot /var/www/foobar.example/
9597
<VirtualHost>
96-
9798
```
9899

99100
## Installation

0 commit comments

Comments
 (0)