txtsanitize

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TXTSanitize

func TXTSanitize(in string) string

TXTSanitize - attempts to make sure that the return value is enclosed in double quotes, and any embedded double quotes are escaped properly with `\`. It honors pre-escaped sequences inside, in that it ignores all but those preceding an embedded double quote. The return value is idempotent, meaning you can feed the output back into TXTSanitize and you should get the same result as the initial call. This is important so that we don't re-escape things such as in the case when reading a TXT record from an API call and sending the payload back in a subsequent update call.

Types

This section is empty.

Jump to

Keyboard shortcuts

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