Instanciate common attributes everywhere so one can simply use the extend method
This commit is contained in:
5
link.go
5
link.go
@@ -19,7 +19,10 @@ type Link struct {
|
||||
|
||||
// NewLink creates a new Link. It returns a *Link.
|
||||
func NewLink(href string) *Link {
|
||||
return &Link{Href: href}
|
||||
return &Link{
|
||||
CommonAttributes: newCommonAttributes(),
|
||||
Href: href,
|
||||
}
|
||||
}
|
||||
|
||||
// Check checks the Link for incompatibilities with RFC4287. It returns an
|
||||
|
Reference in New Issue
Block a user