Skip to content

Commit

Permalink
Adjust a test helper
Browse files Browse the repository at this point in the history
  • Loading branch information
bep committed Jul 14, 2021
1 parent 5cb52c2 commit eb2a500
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions hugolib/testhelpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ type sitesBuilder struct {
// Default toml
configFormat string
configFileSet bool
configSet bool
configSet bool

// Default is empty.
// TODO(bep) revisit this and consider always setting it to something.
Expand Down Expand Up @@ -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())
}
}

Expand Down

0 comments on commit eb2a500

Please sign in to comment.