Skip to content

Commit

Permalink
hreflinks: nocache
Browse files Browse the repository at this point in the history
  • Loading branch information
xushiwei committed Aug 1, 2024
1 parent b227763 commit b147a84
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions chore/gopkgimps/gopkgimps.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ func main() {
for _, name := range names {
log.Println("==> Fetch", name)
doc, err := fetcher.FromInput("gopkg", name)
if err == fetcher.ErrUnknownPageType {
break
if err != nil {
panic(err)
}
docs = append(docs, doc.(gopkg.Result))

Check warning on line 43 in chore/gopkgimps/gopkgimps.go

View check run for this annotation

qiniu-x / golangci-lint

chore/gopkgimps/gopkgimps.go#L43

type assertion must be checked (forcetypeassert)
}
Expand Down
6 changes: 3 additions & 3 deletions chore/hreflinks/links.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (

"github.com/goplus/hdq/fetcher"
_ "github.com/goplus/hdq/fetcher/hrefs"
_ "github.com/goplus/hdq/stream/http/cached"
_ "github.com/goplus/hdq/stream/http/nocache"
)

// Usage: hreflinks [url ...]
Expand All @@ -43,8 +43,8 @@ func main() {
for _, url := range urls {
log.Println("==> Fetch", url)
doc, err := fetcher.FromInput("hrefs", url)
if err == fetcher.ErrUnknownPageType {
break
if err != nil {
panic(err)
}
docs = append(docs, doc)
}
Expand Down
4 changes: 2 additions & 2 deletions chore/pysigfetch/pysigfetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ func main() {
for _, name := range names {
log.Println("==> Fetch", name)
doc, err := fetcher.FromInput(moduleName, name)
if err == fetcher.ErrUnknownPageType {
break
if err != nil {
panic(err)
}
docs = append(docs, doc)
}
Expand Down

0 comments on commit b147a84

Please sign in to comment.