Documentation ¶
Index ¶
- func Bytes(b []byte) ([]byte, error)
- func BytesRestricted(b []byte, noUnset, noEmpty bool) ([]byte, error)
- func BytesRestrictedNoDigit(b []byte, noUnset, noEmpty bool, noDigit bool) ([]byte, error)
- func ReadFile(filename string) ([]byte, error)
- func ReadFileRestricted(filename string, noUnset, noEmpty bool) ([]byte, error)
- func ReadFileRestrictedNoDigit(filename string, noUnset, noEmpty bool, noDigit bool) ([]byte, error)
- func String(s string) (string, error)
- func StringRestricted(s string, noUnset, noEmpty bool) (string, error)
- func StringRestrictedNoDigit(s string, noUnset, noEmpty bool, noDigit bool) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bytes ¶
Bytes returns the bytes represented by the parsed template after processing it. If the parser encounters invalid input, it returns an error describing the failure.
func BytesRestricted ¶
BytesRestricted returns the bytes represented by the parsed template after processing it. If the parser encounters invalid input, or a restriction is violated, it returns an error describing the failure.
func BytesRestrictedNoDigit ¶ added in v1.4.0
Like BytesRestricted but additionally allows to ignore env variables which start with a digit.
func ReadFile ¶
ReadFile call io.ReadFile with the given file name. If the call to io.ReadFile failed it returns the error; otherwise it will call envsubst.Bytes with the returned content.
func ReadFileRestricted ¶
ReadFileRestricted calls io.ReadFile with the given file name. If the call to io.ReadFile failed it returns the error; otherwise it will call envsubst.Bytes with the returned content.
func ReadFileRestrictedNoDigit ¶ added in v1.4.0
func ReadFileRestrictedNoDigit(filename string, noUnset, noEmpty bool, noDigit bool) ([]byte, error)
Like ReadFileRestricted but additionally allows to ignore env variables which start with a digit.
func String ¶
String returns the parsed template string after processing it. If the parser encounters invalid input, it returns an error describing the failure.
func StringRestricted ¶
StringRestricted returns the parsed template string after processing it. If the parser encounters invalid input, or a restriction is violated, it returns an error describing the failure. Errors on first failure or returns a collection of failures if failOnFirst is false
Types ¶
This section is empty.