transform

package
v1.41.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2025 License: Apache-2.0 Imports: 13 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EscapeHTML = html.EscapeString

Functions

func DecodeBase64

func DecodeBase64(s string) string

DecodeBase64 decodes base64 with standard encoding.

func DecodeBase64URL added in v1.29.1

func DecodeBase64URL(s string) string

DecodeBase64URL decodes URL safe base64 variant.

func EncodeBase64

func EncodeBase64(s string) string

EncodeBase64 uses standard format non-URL safe base64 encoding to encode a string.

func EncodeBase64Chunks added in v1.31.0

func EncodeBase64Chunks(s string, maxChunkSize uint) []string

EncodeBase64Chunks creates a slice of maxiumum size base64 strings, where the maxChunkSize is the calculated base64 chunk size and not of the original data. This is useful when you know you need to send some data in a chunked manner and the target contains a data size restriction, but you do not want to guess at the size of encoded data.

If a chunk size maximum is requested that is larger than the encoded string will be the only chunk.

func EncodeBase64URL added in v1.29.1

func EncodeBase64URL(s string) string

EncodeBase64URL encodes to URL safe base64 with padding.

func EscapeXML

func EscapeXML(s string) string

func Inflate added in v1.21.1

func Inflate(compressed []byte) ([]byte, bool)

Given gzip encoded data, return the decompressed data.

func PackBigInt16 added in v1.1.0

func PackBigInt16(n int) string

PackBigInt16 packs a big-endian 16-bit integer as a string.

func PackBigInt32 added in v1.1.0

func PackBigInt32(n int) string

PackBigInt32 packs a big-endian 32-bit integer as a string.

func PackBigInt64 added in v1.34.0

func PackBigInt64(n int) string

PackBigInt64 packs a big-endian 64-bit integer as a string.

func PackLittleInt32 added in v1.0.14

func PackLittleInt32(n int) string

PackLittleInt32 packs a little-endian 32-bit integer as a string.

func PackLittleInt64 added in v1.0.14

func PackLittleInt64(n int) string

PackLittleInt64 packs a little-endian 64-bit integer as a string.

func Title added in v1.0.7

func Title(s string) string

func URLEncodeString added in v1.8.2

func URLEncodeString(inputString string) string

URL encode every character in the provided string.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL