MCPcopy
hub / github.com/restic/restic / checkFilter

Function checkFilter

internal/debug/debug.go:142–161  ·  view source on GitHub ↗
(filter map[string]bool, key string)

Source from the content-addressed store, hash-verified

140}
141
142func 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).
164func Log(f string, args ...interface{}) {

Callers 1

LogFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected