Documentation
¶
Index ¶
- type Set
- func (s *Set[T]) Add(item T)
- func (s *Set[T]) Clear()
- func (s *Set[T]) Contains(items *Set[T]) bool
- func (s *Set[T]) ContainsAny(items *Set[T]) bool
- func (s *Set[T]) Delete(item T)
- func (s *Set[T]) Has(item T) bool
- func (s *Set[T]) Len() int
- func (s *Set[T]) MarshalJSON() ([]byte, error)
- func (s *Set[T]) MarshalYAML() (interface{}, error)
- func (s *Set[T]) Slice() []T
- func (s *Set[T]) SliceAny() []any
- func (s *Set[T]) UnmarshalJSON(data []byte) error
- func (s *Set[T]) UnmarshalYAML(unmarshal func(interface{}) error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Set ¶
type Set[T constraints.Ordered] map[T]struct{}
func New ¶
func New[T constraints.Ordered](items []T) *Set[T]
func (*Set[T]) ContainsAny ¶
func (*Set[T]) MarshalJSON ¶ added in v1.0.2
func (*Set[T]) MarshalYAML ¶ added in v1.0.3
func (*Set[T]) UnmarshalJSON ¶
func (*Set[T]) UnmarshalYAML ¶
Click to show internal directories.
Click to hide internal directories.