Working on Medium feed #217
Open
Annotations
8 errors
|
news/medium.go#L844
[golangci] reported by reviewdog 🐶
S1009: should omit nil check; len() for nil slices is defined as zero (staticcheck)
Raw Output:
news/medium.go:844:5: S1009: should omit nil check; len() for nil slices is defined as zero (staticcheck)
if response.Errors != nil && len(response.Errors) > 0 {
^
16 issues:
* errcheck: 4
* govet: 1
* staticcheck: 11
|
|
news/medium.go#L667
[golangci] reported by reviewdog 🐶
S1009: should omit nil check; len() for nil slices is defined as zero (staticcheck)
Raw Output:
news/medium.go:667:12: S1009: should omit nil check; len() for nil slices is defined as zero (staticcheck)
} else if response.Payload.Value.Posts != nil && len(response.Payload.Value.Posts) > 0 {
^
|
|
news/medium.go#L636
[golangci] reported by reviewdog 🐶
S1009: should omit nil check; len() for nil maps is defined as zero (staticcheck)
Raw Output:
news/medium.go:636:12: S1009: should omit nil check; len() for nil maps is defined as zero (staticcheck)
} else if response.Payload.PostRefs != nil && len(response.Payload.PostRefs) > 0 {
^
|
|
news/medium.go#L606
[golangci] reported by reviewdog 🐶
S1009: should omit nil check; len() for nil maps is defined as zero (staticcheck)
Raw Output:
news/medium.go:606:5: S1009: should omit nil check; len() for nil maps is defined as zero (staticcheck)
if response.Payload.Posts != nil && len(response.Payload.Posts) > 0 {
^
|
|
news/medium.go#L292
[golangci] reported by reviewdog 🐶
QF1004: could use strings.ReplaceAll instead (staticcheck)
Raw Output:
news/medium.go:292:75: QF1004: could use strings.ReplaceAll instead (staticcheck)
fetchURL := fmt.Sprintf(domain.urlFmt, url.QueryEscape(strings.ToLower(strings.Replace(query, " ", "-", -1))))
^
|
|
news/medium.go#L53
[golangci] reported by reviewdog 🐶
QF1004: could use strings.ReplaceAll instead (staticcheck)
Raw Output:
news/medium.go:53:25: QF1004: could use strings.ReplaceAll instead (staticcheck)
tag := strings.ToLower(strings.Replace(query, " ", "-", -1))
^
|
|
news/medium.go#L569
[golangci] reported by reviewdog 🐶
Error return value of `resp.Body.Close` is not checked (errcheck)
Raw Output:
news/medium.go:569:23: Error return value of `resp.Body.Close` is not checked (errcheck)
defer resp.Body.Close()
^
|
|
news/medium.go#L111
[golangci] reported by reviewdog 🐶
Error return value of `resp.Body.Close` is not checked (errcheck)
Raw Output:
news/medium.go:111:23: Error return value of `resp.Body.Close` is not checked (errcheck)
defer resp.Body.Close()
^
|
The logs for this run have expired and are no longer available.
Loading