Merge pull request #3 from bouk/less-code=better

hooks: Remove unnecessary explicit slice creation
This commit is contained in:
Simon Eskildsen 2014-03-11 10:56:33 -04:00
commit 8fb601a60b
1 changed files with 0 additions and 4 deletions

View File

@ -9,10 +9,6 @@ type levelHooks map[Level][]Hook
func (hooks levelHooks) Add(hook Hook) {
for _, level := range hook.Levels() {
if _, ok := hooks[level]; !ok {
hooks[level] = make([]Hook, 0, 1)
}
hooks[level] = append(hooks[level], hook)
}
}