MCPcopy Create free account
hub / github.com/Shopify/goose / AddSensitiveSubstring

Function AddSensitiveSubstring

redact/redact.go:18–24  ·  view source on GitHub ↗
(substrings ...string)

Source from the content-addressed store, hash-verified

16}
17
18func AddSensitiveSubstring(substrings ...string) {
19 lowerSubstrings := make([]string, len(substrings))
20 for i, s := range substrings {
21 lowerSubstrings[i] = strings.ToLower(s)
22 }
23 GlobalSensitiveSubstrings = append(GlobalSensitiveSubstrings, lowerSubstrings...)
24}
25
26func IsSensitive(key string) bool {
27 for _, sensitiveKey := range GlobalSensitiveSubstrings {

Callers 1

TestMapCustomSubstringsFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestMapCustomSubstringsFunction · 0.68