Skip to content

Commit

Permalink
err msg optimized.
Browse files Browse the repository at this point in the history
  • Loading branch information
wedojava committed Sep 29, 2020
1 parent a07d6aa commit 6c28284
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/fetcher/sites/cna/cna.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func setTitle(p *Post) error {
strings.Contains(title, "| 科技 |") ||
strings.Contains(title, "| 證券 |") ||
strings.Contains(title, "| 產經 |") {
return errors.New("ignore posts: " + p.URL.String())
return errors.New("ignore post on purpose: " + p.URL.String())
}
title = strings.ReplaceAll(title, " | 中央社 CNA", "")
title = strings.TrimSpace(title)
Expand Down
2 changes: 1 addition & 1 deletion internal/fetcher/sites/ltn/ltn.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func setTitle(p *Post) error {
strings.Contains(title, "- 健康 -") ||
strings.Contains(title, "- 汽車 -") ||
strings.Contains(title, "- 財經 -") {
return errors.New("ignore posts: " + p.URL.String())
return errors.New("ignore post on purpose: " + p.URL.String())
}
title = strings.ReplaceAll(title, " - 自由時報電子報", "")
title = strings.TrimSpace(title)
Expand Down

0 comments on commit 6c28284

Please # to comment.