Get rid of checks when creating constructs. Check should handle this.
This commit is contained in:
11
xhtmlDiv.go
11
xhtmlDiv.go
@@ -2,7 +2,6 @@ package atom
|
||||
|
||||
import (
|
||||
"encoding/xml"
|
||||
"errors"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
@@ -12,16 +11,12 @@ type XHTMLDiv struct {
|
||||
Content string `xml:",innerxml"`
|
||||
}
|
||||
|
||||
// NewXHTMLDiv creates a new XHTMLDiv. It returns a *XHTMLDiv and an error.
|
||||
func NewXHTMLDiv(content string) (*XHTMLDiv, error) {
|
||||
if content == "" {
|
||||
return nil, errors.New("error creating new xhtml div: content string empty")
|
||||
}
|
||||
|
||||
// NewXHTMLDiv creates a new XHTMLDiv. It returns a *XHTMLDiv.
|
||||
func NewXHTMLDiv(content string) *XHTMLDiv {
|
||||
return &XHTMLDiv{
|
||||
XMLNS: "http://www.w3.org/1999/xhtml",
|
||||
Content: content,
|
||||
}, nil
|
||||
}
|
||||
}
|
||||
|
||||
// Check checks the XHTMLDiv for incompatibilities with RFC4287. It returns an
|
||||
|
Reference in New Issue
Block a user