@@ -157,16 +157,17 @@ func (s *Shell) SetBlockFuncs(blockFuncs []BlockFunc) {
157157
158158// CommandsBlocker creates a BlockFunc that blocks exact command matches
159159func CommandsBlocker(bannedCommands []string) BlockFunc {
160− bannedSet := make(map[string]bool)
160+ bannedSet := make(map[string]struct{})
161161 for _, cmd := range bannedCommands {
162− bannedSet[cmd] = true
162+ bannedSet[cmd] = struct{}{}
163163 }
164164
165165 return func(args []string) bool {
166166 if len(args) == 0 {
167167 return false
168168 }
169− return bannedSet[args[0]]
169+ _, ok := bannedSet[args[0]]
170+ return ok
170171 }
171172}
172173