Help us shape the future of Go! Take the 2026 Go Developer Survey

internal

package
v0.69.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConvertNumericXMLEntities = true
View Source
var FormulaEscaper = strings.NewReplacer(
	`&`, "&",
	`'`, "'",
	`<`, "&lt;",
	`>`, "&gt;",
	`"`, "&quot;",
)
View Source
var MarshalWide = false
View Source
var TypeRegistry metadataTypeRegistry

Functions

func DisableIndent

func DisableIndent(e *xml.Encoder)

func EnableIndent

func EnableIndent(e *xml.Encoder)

func Marshal

func Marshal(t interface{}) ([]byte, error)

func MarshalXml

func MarshalXml(o any, e *xml.Encoder, start xml.StartElement) error

func SelfClosing

func SelfClosing(b []byte) []byte

Make empty tags self-closing

func SelfClosingNamed added in v0.69.0

func SelfClosingNamed(b []byte, names []string) []byte

Make empty tags with the given names self-closing

func SelfClosingWithAttributes added in v0.69.0

func SelfClosingWithAttributes(b []byte) []byte

Make empty tags that have attributes self-closing

func TrimSuffixToEnd

func TrimSuffixToEnd(s, suffix string) string

Trim suffix plus anything that follows it.

func WriteToFile

func WriteToFile(t interface{}, fileName string) error

Types

type EmptyElementKeeper added in v0.69.0

type EmptyElementKeeper interface {
	KeepEmptyElements()
}

EmptyElementKeeper is implemented by metadata types that Salesforce writes with empty elements as <name></name> instead of <name/>. Marshal leaves their empty elements open, except for those with attributes, such as <name xsi:nil="true"/>, which Salesforce still writes self-closed.

type OpenMetadataFunc

type OpenMetadataFunc func(path string) (metadata.RegisterableMetadata, error)

type SelfClosedElementNamer added in v0.69.0

type SelfClosedElementNamer interface {
	SelfClosedElements() []string
}

SelfClosedElementNamer is implemented by an EmptyElementKeeper whose complex elements Salesforce writes self-closed when they have no children, such as a flow's <value/>, while it writes its empty text elements open.

Jump to

Keyboard shortcuts

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