Skip to content

Commit 8e42d3d

Browse files
sy-recordsLinkinStars
authored andcommittedOct 8, 2024··
fix: replace TextCensorResult with textCensorResult
1 parent 4f6733f commit 8e42d3d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎reviewer-baidu/basic.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,14 @@ func (r *Reviewer) Review(content *plugin.ReviewContent) (result *plugin.ReviewR
7575
}
7676

7777
client := censor.NewClient(r.Config.APIKey, r.Config.SecretKey)
78-
TextCensorResult, err := client.TextCensor(content.Title+"\n"+content.Content, content.IP)
78+
textCensorResult, err := client.TextCensor(content.Title+"\n"+content.Content, content.IP)
7979
if err != nil {
8080
log.Errorf("Request baidu to check failed: %v", err)
8181
return handleReviewError(content, plugin.ReviewStatusNeedReview)
8282
}
8383

8484
var jsonMap map[string]interface{}
85-
err = json.Unmarshal([]byte(TextCensorResult), &jsonMap)
85+
err = json.Unmarshal([]byte(textCensorResult), &jsonMap)
8686
if err != nil {
8787
return handleReviewError(content, plugin.ReviewStatusNeedReview)
8888
}

0 commit comments

Comments
 (0)
Please sign in to comment.