Files
papeer/book/chapter.go
2021-12-22 22:28:19 +01:00

35 lines
626 B
Go

package book
type chapter struct {
body string
name string
author string
content string
subChapters []chapter
config *ScrapeConfig
}
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 {
return c.name
}
func (c chapter) Author() string {
return c.author
}
func (c chapter) Content() string {
return c.content
}
func (c chapter) SubChapters() []chapter {
return c.subChapters
}