1
0
mirror of https://github.com/offen/docker-volume-backup.git synced 2025-11-23 21:44:40 +02:00

Add env template helper (#121)

This commit is contained in:
Frederik Ring
2022-07-06 13:16:32 +02:00
committed by GitHub
parent c2a8cc92fc
commit 342ae5910e
5 changed files with 7 additions and 3 deletions

View File

@@ -32,8 +32,9 @@ Here is a list of all data passed to the template:
## Functions
Some formatting functions are also available:
Some formatting and helper functions are also available:
* `formatTime`: formats a time object using [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) format (e.g. `2022-02-11T01:00:00Z`)
* `formatBytesBin`: formats an amount of bytes using powers of 1024 (e.g. `7055258` bytes will be `6.7 MiB`)
* `formatBytesDec`: formats an amount of bytes using powers of 1000 (e.g. `7055258` bytes will be `7.1 MB`)
* `env`: returns the value of the environment variable of the given key if set