Skip to content

Commit

Permalink
Merge pull request #6 from xushiwei/q
Browse files Browse the repository at this point in the history
README
  • Loading branch information
xushiwei authored Jun 8, 2022
2 parents 2ca0e54 + ea5cb6f commit 325907b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import "github.com/goplus/hdq"

func links(url interface{}) []string {
doc := hdq.Source(url)
return [link for a <- doc.any.a, link := a.href?:""; link != ""]
return [link for a <- doc.any.a if link := a.href?:""; link != ""]
}
```

Expand Down
4 changes: 2 additions & 2 deletions tutorial/01-Links/links.gop
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import (
"os"
"github.com/goplus/hdq"
"os"
)

func links(r interface{}) []string {
doc := hdq.Source(r)
return [link for a <- doc.any.a, link := a.href?:""; link != ""]
return [link for a <- doc.any.a if link := a.href?:""; link != ""]
}

for link <- links("zip://../02-GithubRepos/data.zip#index.htm") {
Expand Down

0 comments on commit 325907b

Please sign in to comment.