mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
move StringSet to utils package
This commit is contained in:
parent
ddac7d94a8
commit
df8be72c6f
9 changed files with 50 additions and 40 deletions
11
irc/types.go
11
irc/types.go
|
|
@ -28,17 +28,6 @@ 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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue