Unify error messages
This commit is contained in:
@@ -2,7 +2,7 @@ package atom
|
||||
|
||||
import (
|
||||
"encoding/xml"
|
||||
"errors"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type XHTMLDiv struct {
|
||||
@@ -23,7 +23,7 @@ func NewXHTMLDiv(content string) *XHTMLDiv {
|
||||
// error.
|
||||
func (x *XHTMLDiv) Check() error {
|
||||
if x.XMLNS != "http://www.w3.org/1999/xhtml" {
|
||||
return errors.New("xmlns attribute of xhtml text must be http://www.w3.org/1999/xhtml")
|
||||
return fmt.Errorf("xmlns attribute of xhtml text %v must be http://www.w3.org/1999/xhtml", x)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user