Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type List ¶
type List[T comparable] struct { // contains filtered or unexported fields }
List holds a unique collection of items of type T. Membership can be checked by calling the Contains method.
func NewFromYAML ¶
func NewFromYAML[T comparable](data []byte) (*List[T], error)
NewFromYAML reads a YAML sequence of values of type T and returns a *List[T] containing those values. If data is empty, an empty (deny all) list is returned. If data cannot be parsed, an error is returned.
func NewList ¶
func NewList[T comparable](members []T) *List[T]
NewList returns a *List[T] populated with the provided members of type T. All duplicate entries are ignored, ensuring uniqueness.
Click to show internal directories.
Click to hide internal directories.