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

property

package
v0.0.663 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 2 Imported by: 1,055

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type List

type List []Property

func BuildList

func BuildList(rawProperties []any) (List, error)

BuildList creates a new property List from a slice of any, erroring if any elements are maps with non-string keys. Slices in the property List are converted to property Lists. Maps in the property List are converted to property Maps.

type Map

type Map map[string]Property

func BuildMap

func BuildMap(rawProperties map[any]any) (Map, error)

BuildMap creates a new string keyed map from an interface{}-keyed map, erroring if a key is not a string

func (*Map) UnmarshalYAML

func (m *Map) UnmarshalYAML(unmarshal func(any) error) error

type Property

type Property any

Property represents a constrained value which can be a Map, a List, or a primitive. If the property is a Map, keys must be strings and values are properties. These constraints are only enforced by the builder functions: Build, BuildMap, and BuildList.

func Build

func Build(val any) (Property, error)

Build creates a generic property that may be a Map, List or primitive. If it is a Map or List it will be built using the appropriate builder and constraints.

Jump to

Keyboard shortcuts

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