MCPcopy Create free account
hub / github.com/astercloud/aster / Sanitize

Method Sanitize

pkg/knowledge/manager.go:86–95  ·  view source on GitHub ↗
(item *KnowledgeItem)

Source from the content-addressed store, hash-verified

84}
85
86func (r *redactionStrategy) Sanitize(item *KnowledgeItem) *KnowledgeItem {
87 if r == nil || r.redactor == nil || item == nil {
88 return item
89 }
90 s := *item
91 s.Content = r.redactor.Redact(item.Content)
92 s.Description = r.redactor.Redact(item.Description)
93 s.Title = r.redactor.Redact(item.Title)
94 return &s
95}
96
97// NewManager 创建知识管理器
98func NewManager(config *ManagerConfig) (Manager, error) {

Callers

nothing calls this directly

Calls 1

RedactMethod · 0.65

Tested by

no test coverage detected