3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-22 10:42:52 +01:00
This commit is contained in:
Shivaram Lingamneni 2018-05-22 04:23:33 -04:00
parent f142bf065d
commit 0751f52f37

View File

@ -340,6 +340,10 @@ func NewModeSet() *ModeSet {
// test whether `mode` is set
func (set *ModeSet) HasMode(mode Mode) bool {
if set == nil {
return false
}
set.RLock()
defer set.RUnlock()
return set.modes[mode]