Skip to content

Commit

Permalink
add new method for dump
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Apr 22, 2021
1 parent 4b981bb commit 5779f25
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions dump/dumper.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ func NewDumper(out io.Writer, skip int) *Dumper {
}
}

// NewWithOptions create
func NewWithOptions(fn func(opts *Options)) *Dumper {
d := NewDumper(os.Stdout, 3)
fn(d.Options)

return d
}

// NewDefaultOptions create.
func NewDefaultOptions(out io.Writer, skip int) *Options {
if out == nil {
Expand Down

0 comments on commit 5779f25

Please sign in to comment.