adding OBS support
This commit is contained in:
@@ -100,6 +100,15 @@ func funcMap() template.FuncMap {
|
||||
// Use this to keep secrets (tokens, passwords) out of modules.yaml.
|
||||
"env": os.Getenv,
|
||||
|
||||
// envDefault returns the value of an environment variable, or
|
||||
// fallback if the variable is empty/unset.
|
||||
"envDefault": func(key, fallback string) string {
|
||||
if v := os.Getenv(key); v != "" {
|
||||
return v
|
||||
}
|
||||
return fallback
|
||||
},
|
||||
|
||||
// expiry converts a duration string like "+1h" to a Unix epoch timestamp string.
|
||||
// Pass "" or "0" to get "0" (no expiry). Supports Go duration syntax (e.g. "30m", "2h").
|
||||
// Note: time.ParseDuration does not support days (d) or weeks (w).
|
||||
|
||||
Reference in New Issue
Block a user