envexp: add top-level Expand() using Getenv
Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package envexp
|
||||
|
||||
import (
|
||||
"os"
|
||||
)
|
||||
|
||||
var envExpander = &expander{
|
||||
get: os.Getenv,
|
||||
}
|
||||
|
||||
// Expand uses os.GetEnv() to expand a given string
|
||||
func Expand(s string) string {
|
||||
return envExpander.Expand(s)
|
||||
}
|
||||
Reference in New Issue
Block a user