mirror of
https://github.com/NohamR/papeer.git
synced 2026-05-25 04:17:19 +00:00
add test suites, scrape config
This commit is contained in:
@@ -1,13 +1,20 @@
|
||||
package book
|
||||
|
||||
type chapter struct {
|
||||
name string
|
||||
author string
|
||||
content string
|
||||
body string
|
||||
name string
|
||||
author string
|
||||
content string
|
||||
subChapters []chapter
|
||||
config *ScrapeConfig
|
||||
}
|
||||
|
||||
func NewChapter(name, author, content string) chapter {
|
||||
return chapter{name, author, content}
|
||||
func NewChapter(body, name, author, content string, subChapters []chapter, config *ScrapeConfig) chapter {
|
||||
return chapter{body, name, author, content, subChapters, config}
|
||||
}
|
||||
|
||||
func (c chapter) Body() string {
|
||||
return c.body
|
||||
}
|
||||
|
||||
func (c chapter) Name() string {
|
||||
@@ -21,3 +28,7 @@ func (c chapter) Author() string {
|
||||
func (c chapter) Content() string {
|
||||
return c.content
|
||||
}
|
||||
|
||||
func (c chapter) SubChapters() []chapter {
|
||||
return c.subChapters
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user