Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
foolin committed May 8, 2020
1 parent c86c9b4 commit 3f81668
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion builtin.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
)

// CallFunc write function interface

//
// # Define Global Function
//
// func MyFunc(node *goquery.Selection, args ...string) (out interface{}, err error) {
Expand Down
4 changes: 2 additions & 2 deletions pagser.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import (
// Pagser the page parser
type Pagser struct {
Config Config
//ctxTags map[string]*tagTokenizer // tag value => tagTokenizer
//mapTags map[string]*tagTokenizer // tag value => tagTokenizer
mapTags sync.Map //map[string]*tagTokenizer
//ctxFuncs map[string]CallFunc // name => func
//mapFuncs map[string]CallFunc // name => func
mapFuncs sync.Map //map[string]CallFunc
}

Expand Down
3 changes: 2 additions & 1 deletion parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func (p *Pagser) Parse(v interface{}, document string) (err error) {
return p.ParseDocument(v, reader)
}

// Parse parse html to struct
// ParseReader parse html to struct
func (p *Pagser) ParseReader(v interface{}, reader io.Reader) (err error) {
doc, err := goquery.NewDocumentFromReader(reader)
if err != nil {
Expand All @@ -33,6 +33,7 @@ func (p *Pagser) ParseDocument(v interface{}, document *goquery.Document) (err e
return p.ParseSelection(v, document.Selection)
}

// ParseSelection parse selection to struct
func (p *Pagser) ParseSelection(v interface{}, selection *goquery.Selection) (err error) {
return p.doParse(v, nil, selection)
}
Expand Down

0 comments on commit 3f81668

Please sign in to comment.