MCPcopy Create free account
hub / github.com/anxuanzi/bua / AddPattern

Method AddPattern

agent/message.go:213–220  ·  view source on GitHub ↗

AddPattern adds a custom sensitive data pattern.

(name, pattern string)

Source from the content-addressed store, hash-verified

211
212// AddPattern adds a custom sensitive data pattern.
213func (f *SensitiveDataFilter) AddPattern(name, pattern string) error {
214 re, err := regexp.Compile(pattern)
215 if err != nil {
216 return fmt.Errorf("invalid pattern: %w", err)
217 }
218 f.patterns[name] = re
219 return nil
220}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected