MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / Filter

Method Filter

monitoring/meta.go:20–28  ·  view source on GitHub ↗

Filter creates a copy of Meta with only the specified keys.

(only ...string)

Source from the content-addressed store, hash-verified

18
19// Filter creates a copy of Meta with only the specified keys.
20func (m Meta) Filter(only ...string) Meta {
21 filtered := make(Meta)
22 for _, key := range only {
23 if value, ok := m[key]; ok {
24 filtered[key] = value
25 }
26 }
27 return filtered
28}
29
30// MetaKey formats a metadata key with the standard prefix.
31func MetaKey(key string) string {

Callers 3

TestMetaFilterFunction · 0.95
processImageMethod · 0.45
sanitizeElementMethod · 0.45

Calls

no outgoing calls

Tested by 1

TestMetaFilterFunction · 0.76