Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var FullStringEscapeFunction = escapeCharactersForJson
FullStringEscapeFunction fully escapes any special characters in the input string, ensure it is valid for use in JSON
Functions ¶
func EscapeSpecialCharactersInValue ¶
func EscapeSpecialCharactersInValue(value interface{}, escapeFunc StringEscapeFunction) (interface{}, error)
EscapeSpecialCharactersInValue takes a value and tries to escape any strings in it - it will walk recursively in case of maps/maps-of-maps of string and escape any special characters using a StringEscapeFunction. This is used by v1 config templating - with a simple function escaping newlines and v2 parameter values returns - with an escape function escaping strings to be fully JSON compliant
func UseGoTemplatesForDoubleCurlyBraces ¶ added in v2.19.0
UseGoTemplatesForDoubleCurlyBraces replaces each occurrence of "{{" with "{{`{{`}}" and each occurrence of "}}" with "{{`}}`}}". This ensures that when the returned string is used to render templates, e.g. during deployment, the "{{" and "}}" are not misinterpreted.