Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SensitiveMap ¶
type SensitiveMap struct {
// contains filtered or unexported fields
}
ref:https://github.com/TomatoMr/SensitiveWords
func Singleton ¶
func Singleton() *SensitiveMap
func (*SensitiveMap) CheckSensitive ¶
func (s *SensitiveMap) CheckSensitive(text string) (string, bool)
检查是否含有敏感词,仅返回检查到的第一个敏感词,返回值:敏感词,是否含有敏感词
func (*SensitiveMap) FindAllSensitive ¶
func (s *SensitiveMap) FindAllSensitive(text string) map[string]*Target
func (*SensitiveMap) ReplaceAll ¶
func (s *SensitiveMap) ReplaceAll(text string, replacement string) string
Click to show internal directories.
Click to hide internal directories.