internal

package
v0.72.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: MIT Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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