README ¶ Sets import "setof" func main() { s := setof.NewStrings("aaa", "bbb", "aaa") print(len(s)) // 2 s.Update("ccc", "444") print(s.Contains("123")) // false print(s.Contains("aaa")) // true } Expand ▾ Collapse ▴ Documentation ¶ Index ¶ type Strings func NewStrings(v ...string) Strings func (set Strings) Contains(v string) bool func (set Strings) Remove(v ...string) Strings func (set Strings) SortedList() []string func (set Strings) Update(v ...string) Strings Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Strings ¶ type Strings map[string]struct{} func NewStrings ¶ added in v1.0.4 func NewStrings(v ...string) Strings func (Strings) Contains ¶ added in v1.0.4 func (set Strings) Contains(v string) bool func (Strings) Remove ¶ added in v1.0.4 func (set Strings) Remove(v ...string) Strings func (Strings) SortedList ¶ added in v1.0.4 func (set Strings) SortedList() []string func (Strings) Update ¶ added in v1.0.4 func (set Strings) Update(v ...string) Strings Source Files ¶ View all Source files strings.go Click to show internal directories. Click to hide internal directories.