handle OR'd tags where the first tag matches nothing : assignment to nil map panic
This commit is contained in:
parent
185393d62d
commit
bd86e90174
2 changed files with 24 additions and 5 deletions
|
|
@ -9,6 +9,8 @@ import (
|
|||
type Set map[string]bool
|
||||
|
||||
// add members to the "set"
|
||||
// TODO: this probably should have been a pointer receiver to handle the nil map case.
|
||||
// currently doing some roundabout checks before calling.
|
||||
func (s Set) Add(mems ...string) {
|
||||
for _, m := range mems {
|
||||
s[m] = true
|
||||
|
|
|
|||
Loading…
Reference in a new issue