Skip to content

Commit

Permalink
added DefaultStructRowsViewer()
Browse files Browse the repository at this point in the history
  • Loading branch information
ungerik committed Jan 29, 2024
1 parent 7f484f9 commit cb6fe99
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,19 @@ var (
}
return &DefaultStructFieldNaming, nil
}

noTagsStructRowsViewer StructRowsViewer
)

// NoTagsStructRowsViewer returns a viewer
// DefaultStructRowsViewer returns a StructRowsViewer
// that uses DefaultStructFieldNaming and no MapIndices.
func DefaultStructRowsViewer() *StructRowsViewer {
return &StructRowsViewer{StructFieldNaming: DefaultStructFieldNaming}
}

// NoTagsStructRowsViewer returns a StructRowsViewer
// that uses the struct field names as column titles
// without considering struct field tags.
func NoTagsStructRowsViewer() Viewer {
return &noTagsStructRowsViewer
func NoTagsStructRowsViewer() *StructRowsViewer {
return &StructRowsViewer{}
}

var (
Expand Down

0 comments on commit cb6fe99

Please sign in to comment.