Index
- func Base64[T string | []byte](value T) string
- func Base64Runtime(value any) string
- func Bytes(b64string string) []byte
- func String(b64string string) string
func Base64
func Base64[T string | []byte](value T) string
Base64 converts provided string or bytes value into base64 string. It's a wrapper around existing "base64.StdEncoding.EncodeToString([]byte(...))". Created to simplify work with base64 and provide convenient template function for "templatex".
func Base64Runtime
func Base64Runtime(value any) string
func Bytes
func Bytes(b64string string) []byte
Bytes converts the given base64 string to a bytes value. Should be used in a known environment, when values are expected to be correct. Panics in case of failure. It's a wrapper around existing "base64.StdEncoding.DecodeString(...)". Created to simplify work with base64.
func String
func String(b64string string) string
String converts the given base64 string to a string value. Should be used in a known environment, when values are expected to be correct. Panics in case of failure. It's a wrapper around existing "base64.StdEncoding.DecodeString(...)". Created to simplify work with base64 and provide convenient template function for "templatex".
Generated by gomarkdoc