Skip to content

Commit

Permalink
Fix the nil pointer error (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
mstmdev authored Nov 27, 2023
1 parent 88e0d45 commit 3ed3867
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,10 @@

```bash
go install github.com/no-src/golongman/...@latest
```

## Quick Start

```bash
golongman
```
2 changes: 1 addition & 1 deletion provider/RecommendTodayProvider.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ func NewRecommendTodayProvider() (pro *RecommendTodayProvider) {
func (pro *RecommendTodayProvider) GetRecommendToday() (recommend *model.RecommendToday, err error) {
recommend = &model.RecommendToday{}
body, err := _http.Get(pro.SpiderUrl)
defer body.Close()
if err != nil {
return nil, err
}
defer body.Close()
docHtml, err := _html.NewHtmlDocument(body)
if err != nil {
return nil, err
Expand Down

0 comments on commit 3ed3867

Please sign in to comment.