diff --git a/entry.go b/entry.go index 414f894..eb32dcd 100644 --- a/entry.go +++ b/entry.go @@ -70,11 +70,9 @@ func (e *Entry) Check() error { return fmt.Errorf("entry %v: %v", e.ID.URI, err) } - if e.Categories != nil { - for i, c := range e.Categories { - if err := c.Check(); err != nil { - return fmt.Errorf("category element %v of entry %v: %v", i, e.ID.URI, err) - } + for i, c := range e.Categories { + if err := c.Check(); err != nil { + return fmt.Errorf("category element %v of entry %v: %v", i, e.ID.URI, err) } } @@ -88,19 +86,15 @@ func (e *Entry) Check() error { } } - if e.Contributors != nil { - for i, c := range e.Contributors { - if err := c.Check(); err != nil { - return fmt.Errorf("contributor element %v of entry %v: %v", i, e.ID.URI, err) - } + for i, c := range e.Contributors { + if err := c.Check(); err != nil { + return fmt.Errorf("contributor element %v of entry %v: %v", i, e.ID.URI, err) } } - if e.Links != nil { - for i, l := range e.Links { - if err := l.Check(); err != nil { - return fmt.Errorf("link element %v of entry %v: %v", i, e.ID.URI, err) - } + for i, l := range e.Links { + if err := l.Check(); err != nil { + return fmt.Errorf("link element %v of entry %v: %v", i, e.ID.URI, err) } } @@ -144,11 +138,9 @@ func (e *Entry) Check() error { } } - if e.Extensions != nil { - for i, x := range e.Extensions { - if err := x.Check(); err != nil { - return fmt.Errorf("extension element %v of entry %v: %v", i, e.ID.URI, err) - } + for i, x := range e.Extensions { + if err := x.Check(); err != nil { + return fmt.Errorf("extension element %v of entry %v: %v", i, e.ID.URI, err) } }