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

general

package
v0.68.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FalseText = BooleanText{
	Text: "false",
}
View Source
var TrueText = BooleanText{
	Text: "true",
}

Functions

func RemoveDuplicates

func RemoveDuplicates[T Nameable, S ~[]T](slice *S)

func Tidy

Types

type BooleanText

type BooleanText struct {
	Text string `xml:",chardata"`
}

func BooleanTextValue

func BooleanTextValue(cmd *cobra.Command, flag string) (t *BooleanText)

func (*BooleanText) IsFalse

func (b *BooleanText) IsFalse() bool

func (*BooleanText) IsTrue

func (b *BooleanText) IsTrue() bool

func (BooleanText) MarshalXML

func (b BooleanText) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*BooleanText) String

func (b *BooleanText) String() string

func (*BooleanText) ToBool

func (b *BooleanText) ToBool() bool

type IntegerText

type IntegerText struct {
	Text string `xml:",chardata"`
}

func IntegerValue

func IntegerValue(cmd *cobra.Command, flag string) (t *IntegerText)

type Metadata

type Metadata = metadata.MetadataPointer

type Nameable

type Nameable interface {
	GetName() string
}

type TextLiteral

type TextLiteral struct {
	Text string `xml:",innerxml"`
}

func TextValue

func TextValue(cmd *cobra.Command, flag string) (t *TextLiteral)

func (*TextLiteral) String

func (t *TextLiteral) String() string

type Tidyable

type Tidyable interface {
	Tidy()
}

type TranslationText added in v0.60.0

type TranslationText struct {
	Text    string
	Comment string
}

TranslationText is a translated value in a translation file. Text holds the value with XML entities decoded. Salesforce writes a value that has not been translated as an XML comment holding the untranslated text, such as <label><!-- Account Name --></label>. Text is empty for such a value, and Comment holds the comment's content so the value can be written back unchanged.

UnmarshalXML takes github.com/nbio/xml types because metadata files are parsed with that package, while MarshalXML takes encoding/xml types because they are written with encoding/xml.

func (TranslationText) MarshalXML added in v0.60.0

func (t TranslationText) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*TranslationText) UnmarshalXML added in v0.60.0

func (t *TranslationText) UnmarshalXML(d *nbioxml.Decoder, start nbioxml.StartElement) error

Jump to

Keyboard shortcuts

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