adding envs tagging/interpolation

This commit is contained in:
brent saner
2024-06-17 04:33:30 -04:00
parent eed9c34ebf
commit b64c318a4a
18 changed files with 734 additions and 1575 deletions

View File

@@ -12,22 +12,4 @@ var (
var (
StructTagInterpolate string = "envsub"
StructTagPopulate string = "envpop"
)
var (
defaultInterpolateOpts interpolateOpts = interpolateOpts{
noMapKey: false,
noMapVal: false,
}
// InterpolateOptNoMapKey is the equivalent of the struct tag `no_map_key` for Interpolate.
InterpolateOptNoMapKey optInterpolate = func(o *interpolateOpts) (err error) {
o.noMapKey = true
return
}
// InterpolateOptNoMapValue is the equivalent of the struct tag `no_map_value` for Interpolate.
InterpolateOptNoMapValue optInterpolate = func(o *interpolateOpts) (err error) {
o.noMapVal = true
return
}
)