mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
Add "getenv" as an wrapper for os.Getenv
Add a wrapper for the os.Getenv function. The wrapper takes as input a string that is assumed to be an exported variable name. Fixes #977
This commit is contained in:
parent
32bf8b763c
commit
a044734541
1 changed files with 1 additions and 0 deletions
|
@ -1341,6 +1341,7 @@ func init() {
|
||||||
"getCSV": GetCSV,
|
"getCSV": GetCSV,
|
||||||
"getCsv": GetCSV,
|
"getCsv": GetCSV,
|
||||||
"seq": helpers.Seq,
|
"seq": helpers.Seq,
|
||||||
|
"getenv": func(varName string) string { return os.Getenv(varName) },
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue