mirror of
https://github.com/adnanh/webhook.git
synced 2025-10-26 11:10:58 +00:00
docs: Example for getenv
This commit is contained in:
parent
16c5478680
commit
b326841076
1 changed files with 5 additions and 0 deletions
|
|
@ -81,6 +81,11 @@ In addition to the [built-in Go template functions and features][tt], `webhook`
|
||||||
|
|
||||||
The `getenv` template function can be used for inserting environment variables into a templated configuration file.
|
The `getenv` template function can be used for inserting environment variables into a templated configuration file.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
```json
|
||||||
|
"Secret": "{{getenv \"TEST_secret\" | js}}"
|
||||||
|
```
|
||||||
|
|
||||||
### `cat`
|
### `cat`
|
||||||
|
|
||||||
The `cat` template function can be used to read a file from the local filesystem. This is useful for reading secrets from files. If the file doesn't exist, it returns an empty string.
|
The `cat` template function can be used to read a file from the local filesystem. This is useful for reading secrets from files. If the file doesn't exist, it returns an empty string.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue