Documentation
¶
Index ¶
- type Typ
- func (s Typ[T]) Add(element T, withVal ...string)
- func (s Typ[T]) AsSlice() []T
- func (s Typ[T]) Contains(element T) bool
- func (s Typ[T]) Empty()
- func (s Typ[T]) Remove(element T)
- func (s Typ[T]) Size() int
- func (s Typ[T]) Subtract(another Typ[T]) Typ[T]
- func (s Typ[T]) Union(with Typ[T]) Typ[T]
- func (s Typ[T]) Value(element T) (string, bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Typ ¶
type Typ[T comparable] map[T]string
Typ is a generic type for a set data structure. It can only be used on comparable data types though
func NewFromSlice ¶ added in v0.1.13
func NewFromSlice[T comparable](s []T) Typ[T]
NewFromSlice creates a new set from provided slice.
Click to show internal directories.
Click to hide internal directories.