This is an automated email from the ASF dual-hosted git repository. linkinstar pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/incubator-answer-plugins.git
commit 8e42d3d32b952d49a5423d491c2231ed295d2f1c Author: sy-records <[email protected]> AuthorDate: Tue Oct 8 11:02:11 2024 +0800 fix: replace TextCensorResult with textCensorResult --- reviewer-baidu/basic.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reviewer-baidu/basic.go b/reviewer-baidu/basic.go index a5c3b16..1baf393 100644 --- a/reviewer-baidu/basic.go +++ b/reviewer-baidu/basic.go @@ -75,14 +75,14 @@ func (r *Reviewer) Review(content *plugin.ReviewContent) (result *plugin.ReviewR } client := censor.NewClient(r.Config.APIKey, r.Config.SecretKey) - TextCensorResult, err := client.TextCensor(content.Title+"\n"+content.Content, content.IP) + textCensorResult, err := client.TextCensor(content.Title+"\n"+content.Content, content.IP) if err != nil { log.Errorf("Request baidu to check failed: %v", err) return handleReviewError(content, plugin.ReviewStatusNeedReview) } var jsonMap map[string]interface{} - err = json.Unmarshal([]byte(TextCensorResult), &jsonMap) + err = json.Unmarshal([]byte(textCensorResult), &jsonMap) if err != nil { return handleReviewError(content, plugin.ReviewStatusNeedReview) }
