MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / CheckSensitiveText

Function CheckSensitiveText

service/sensitive.go:35–40  ·  view source on GitHub ↗
(text string)

Source from the content-addressed store, hash-verified

33}
34
35func CheckSensitiveText(text string) ([]string, error) {
36 if ok, words := SensitiveWordContains(text); ok {
37 return words, errors.New("sensitive words detected")
38 }
39 return nil, nil
40}
41
42func CheckSensitiveInput(input any) ([]string, error) {
43 switch v := input.(type) {

Callers 1

CheckSensitiveInputFunction · 0.85

Calls 1

SensitiveWordContainsFunction · 0.85

Tested by

no test coverage detected