1
0
Fork 0
forked from External/ergo
This commit is contained in:
Shivaram Lingamneni 2019-12-17 13:21:26 -05:00
parent 07865b8f63
commit c5a81d59ff
6 changed files with 126 additions and 52 deletions

View file

@ -28,6 +28,17 @@ func (clients ClientSet) Has(client *Client) bool {
return ok
}
type StringSet map[string]empty
func (s StringSet) Has(str string) bool {
_, ok := s[str]
return ok
}
func (s StringSet) Add(str string) {
s[str] = empty{}
}
// MemberSet is a set of members with modes.
type MemberSet map[*Client]*modes.ModeSet