Text constructs should not be pointed towards since they are pointers themselves
This commit is contained in:
parent
c5783268f8
commit
f2c6fce7c9
12
entry.go
12
entry.go
@ -19,10 +19,10 @@ type Entry struct {
|
||||
ID *ID `xml:"id"`
|
||||
Links []*Link `xml:"link,omitempty"`
|
||||
Published *Date `xml:"published,omitempty"`
|
||||
Rights *Text `xml:"rights,omitempty"`
|
||||
Rights Text `xml:"rights,omitempty"`
|
||||
Source *Source `xml:"source,omitempty"`
|
||||
Summary *Text `xml:"summary,omitempty"`
|
||||
Title *Text `xml:"title"`
|
||||
Summary Text `xml:"summary,omitempty"`
|
||||
Title Text `xml:"title"`
|
||||
Updated *Date `xml:"updated"`
|
||||
Extensions []*ExtensionElement `xml:",any,omitempty"`
|
||||
}
|
||||
@ -97,7 +97,7 @@ func (e *Entry) Check() error {
|
||||
}
|
||||
|
||||
if e.Rights != nil {
|
||||
if err := (*e.Rights).Check(); err != nil {
|
||||
if err := e.Rights.Check(); err != nil {
|
||||
return fmt.Errorf("rights element of entry %v: %v", e.ID.URI, err)
|
||||
}
|
||||
}
|
||||
@ -109,7 +109,7 @@ func (e *Entry) Check() error {
|
||||
}
|
||||
|
||||
if e.Summary != nil {
|
||||
if err := (*e.Summary).Check(); err != nil {
|
||||
if err := e.Summary.Check(); err != nil {
|
||||
return fmt.Errorf("summary element of entry %v: %v", e.ID.URI, err)
|
||||
}
|
||||
}
|
||||
@ -117,7 +117,7 @@ func (e *Entry) Check() error {
|
||||
if e.Title == nil {
|
||||
return fmt.Errorf("no title element of entry %v", e.ID.URI)
|
||||
} else {
|
||||
if err := (*e.Title).Check(); err != nil {
|
||||
if err := e.Title.Check(); err != nil {
|
||||
return fmt.Errorf("title element of entry %v: %v", e.ID.URI, err)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user