Skip to content
This repository has been archived by the owner on Mar 4, 2022. It is now read-only.

Commit

Permalink
fix: include key array is empty then return false
Browse files Browse the repository at this point in the history
  • Loading branch information
itning committed Jul 6, 2020
1 parent 0008f4c commit 2379ce6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ func each(nodes xpath.Nodes, request request.Data) {

// 只要有一个关键字存在即返回真
func isIncludeContent(content string) bool {
// 未设置关键字,则返回真
if 0 == len(includeKeyArray) {
return true
}
for _, key := range includeKeyArray {
if strings.Contains(content, key) {
return true
Expand Down

0 comments on commit 2379ce6

Please sign in to comment.