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

custommetadata

package
v0.67.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const NAME = "CustomMetadata"

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomMetadata

type CustomMetadata struct {
	metadata.MetadataInfo
	XMLName   xml.Name    `xml:"CustomMetadata"`
	Xmlns     string      `xml:"xmlns,attr"`
	Xsi       string      `xml:"xmlns:xsi,attr,omitempty"`
	Xsd       string      `xml:"xmlns:xsd,attr,omitempty"`
	Label     string      `xml:"label"`
	Protected BooleanText `xml:"protected"`
	Values    []Value     `xml:"values"`
}

func Open

func Open(path string) (*CustomMetadata, error)

func (*CustomMetadata) AddValue

func (m *CustomMetadata) AddValue(key string, value any)

func (*CustomMetadata) SetMetadata

func (c *CustomMetadata) SetMetadata(m metadata.MetadataInfo)

func (*CustomMetadata) Tidy

func (p *CustomMetadata) Tidy()

func (*CustomMetadata) Type

func (*CustomMetadata) UpdateFieldValue

func (p *CustomMetadata) UpdateFieldValue(field string, value string) error

type TypedValue

type TypedValue struct {
	Text string `xml:",innerxml"`
	Type string `xml:"xsi:type,attr,omitempty"`
	Nil  string `xml:"xsi:nil,attr,omitempty"`
}

type Value

type Value struct {
	Field string     `xml:"field"`
	Value TypedValue `xml:"value"`
}

Jump to

Keyboard shortcuts

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