From f2c6fce7c90eb86ce8101d3f9e04e55ae80d056d Mon Sep 17 00:00:00 2001 From: Jason Streifling Date: Tue, 15 Oct 2024 18:07:06 +0200 Subject: [PATCH] Text constructs should not be pointed towards since they are pointers themselves --- entry.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/entry.go b/entry.go index 744e5ab..de6ec22 100644 --- a/entry.go +++ b/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) } }