Documentation ¶
Overview ¶
Package id contains functions for dealing with various UUID containers.
Index ¶
- type Map
- type Slice
- func (s *Slice) Add(b Slice)
- func (s Slice) Diff(b Slice) Slice
- func (s Slice) Len() int
- func (s Slice) Less(i, j int) bool
- func (s Slice) String() string
- func (s Slice) Sub(b Slice) Slice
- func (s Slice) Swap(i, j int)
- func (s Slice) ToMap() Map
- func (s Slice) ToString(sep string, fn ...func(ID uuid.UUID) string) string
- func (s Slice) ToStringSlice() []string
- func (s Slice) Unique() Slice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Map ¶
Map describes a map of UUID keys with empty structs as their values
func MapFromSlice ¶
MapFromSlice constructs a map of empty struct values with keys taken from the given slice.
type Slice ¶
Slice describes a slice of UUID objects
func (Slice) Less ¶
Less reports whether the element with index i should sort before the element with index j.
func (Slice) ToString ¶
ToString returns all IDs as a string separated by the given separation string. If a callback is specified that callback will be called for every ID to generate a custom output string for that element.
func (Slice) ToStringSlice ¶
ToStringSlice returns a string slice with all IDs as string in it.