a8m / envsubst

Environment variables substitution for Go
MIT License
747 stars 83 forks source link

Add NoReplace option to restrictions #40

Closed dnitsch closed 1 year ago

dnitsch commented 1 year ago

To cover cases where the input string already contains text which can be assigned to an itemVariable, see TestNoReplace for details.

Option not carried to CLI as the existing NoDigit addition works well for CLI templating - but in addition with NoDigit NoReplace will work well for programmatic use cases for example: envsubst.StringNoReplace(payload, false, false, true, true)

as an example see here

dnitsch commented 1 year ago

actually this may not be the way to go ... more thought required as to the usefulness of this