refacto, better scrape strategy

This commit is contained in:
lapwat
2021-09-24 02:09:22 +02:00
parent e50adf5e03
commit ee41e49dd1
8 changed files with 157 additions and 124 deletions

23
book/link.go Normal file
View File

@@ -0,0 +1,23 @@
package book
type link struct {
href string
text string
class string
}
func NewLink(href, text, class string) link {
return link{href, text, class}
}
func (c link) Href() string {
return c.href
}
func (c link) Text() string {
return c.text
}
func (c link) Class() string {
return c.class
}