I have the following struct representing a Webpage
type Webpage struct {
url.URL
references []url.URL
}
I want to represent a website as a collection of Webpages. I am using this struct, but it does not feel like what I am looking for:
type website struct {
[]Webpage
}
I read this as "a website has a slice of Webpages". I want a type that represents "a website is a slice of Webpages".
What type do I use to represent the is relationship instead of the has relationship of a struct field?