| 140 | } |
| 141 | |
| 142 | func checkFilter(filter map[string]bool, key string) bool { |
| 143 | // check if key is enabled directly |
| 144 | if v, ok := filter[key]; ok { |
| 145 | return v |
| 146 | } |
| 147 | |
| 148 | // check for globbing |
| 149 | for k, v := range filter { |
| 150 | if m, _ := path.Match(k, key); m { |
| 151 | return v |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | // check if tag "all" is enabled |
| 156 | if v, ok := filter["all"]; ok && v { |
| 157 | return true |
| 158 | } |
| 159 | |
| 160 | return false |
| 161 | } |
| 162 | |
| 163 | // Log prints a message to the debug log (if debug is enabled). |
| 164 | func Log(f string, args ...interface{}) { |