Encoding
The Encoding registry offers methods for encoding and decoding data in different formats, allowing for flexible data representation and storage within your templates.
base64Encode
The function encodes a given string into its Base64 representation, converting the data into a text format suitable for transmission or storage in systems that support Base64 encoding.
Signature
Must version
base64Decode
The function decodes a Base64 encoded string back to its original form. If the input string is not valid Base64, it returns an error message.
Signature
Must version
base32Encode
The function encodes a given string into its Base32 representation, converting the data into a text format that is compatible with systems supporting Base32 encoding.
Signature
Must version
base32Decode
The function decodes a Base32 encoded string back to its original form. If the input is not valid Base32, it returns an error message.
Signature
Must version
fromJson / mustFromJson
The function converts a JSON string into a corresponding Go data structure, enabling easy manipulation of the JSON data in a Go environment.
Signature
Must version
toJson / mustToJson
The function converts a Go data structure into a JSON string, allowing the data to be easily serialized for storage, transmission, or further processing.
Signature
Must version
toPrettyJson / mustToPrettyJson
The function converts a Go data structure into a pretty-printed JSON string, formatting the output with indentation and line breaks for better readability.
Signature
Must version
toRawJson / mustToRawJson
The function converts a Go data structure into a JSON string without escaping HTML characters, preserving the raw content as it is.
Signature
Must version
fromYaml / mustFromYaml
The function deserializes a YAML string into a Go map, allowing the structured data from YAML to be used and manipulated within a Go program.
Signature
Must version
toYaml / mustToYaml
The function serializes a Go data structure into a YAML string, converting the data into a format suitable for YAML representation.
Signature
Must version
Last updated