diff --git a/nodefilter_test.go b/nodefilter_test.go index 746eee3..2105ff0 100644 --- a/nodefilter_test.go +++ b/nodefilter_test.go @@ -38,13 +38,13 @@ var _ = Describe("使用节点过滤器过滤敏感词数据", func() { It("从文本中读取敏感词数据", func() { nodeFilter = filter.NewNodeFilter([]string{"陈水扁"}) - data, err := nodeFilter.Filter(&filterText, '@') + data, err := nodeFilter.Filter(filterText, '@') if err != nil { Fail(err.Error()) return } Expect(data).To(Equal([]string{"陈水扁"})) - result, err := nodeFilter.FilterResult(&filterText, '@') + result, err := nodeFilter.FilterResult(filterText, '@') if err != nil { Fail(err.Error()) return @@ -59,13 +59,13 @@ var _ = Describe("使用节点过滤器过滤敏感词数据", func() { close(chDirty) }() nodeFilter = filter.NewNodeChanFilter(chDirty) - data, err := nodeFilter.Filter(&filterText, '@') + data, err := nodeFilter.Filter(filterText, '@') if err != nil { Fail(err.Error()) return } Expect(data).To(Equal([]string{"陈水扁"})) - result, err := nodeFilter.FilterResult(&filterText, '@') + result, err := nodeFilter.FilterResult(filterText, '@') if err != nil { Fail(err.Error()) return