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

@@ -7,6 +7,7 @@ import (
"bytes"
_ "embed"
"fmt"
"os"
"text/template"
"time"
@@ -82,6 +83,7 @@ var templateHelpers = template.FuncMap{
"formatBytesBin": func(bytes uint64) string {
return formatBytes(bytes, false)
},
"env": os.Getenv,
}
// formatBytes converts an amount of bytes in a human-readable representation