Adjust a test helper

This commit is contained in:
Bjørn Erik Pedersen 2021-07-14 21:47:26 +02:00
parent 5cb52c2315
commit eb2a500367
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F

View file

@ -1007,12 +1007,8 @@ func dumpPagesLinks(pages ...page.Page) {
func dumpPages(pages ...page.Page) {
fmt.Println("---------")
for _, p := range pages {
var meta interface{}
if p.File() != nil && p.File().FileInfo() != nil {
meta = p.File().FileInfo().Meta()
}
fmt.Printf("Kind: %s Title: %-10s RelPermalink: %-10s Path: %-10s sections: %s Lang: %s Meta: %v\n",
p.Kind(), p.Title(), p.RelPermalink(), p.Path(), p.SectionsPath(), p.Lang(), meta)
fmt.Printf("Kind: %s Title: %-10s RelPermalink: %-10s Path: %-10s sections: %s Lang: %s\n",
p.Kind(), p.Title(), p.RelPermalink(), p.Path(), p.SectionsPath(), p.Lang())
}
}