diff --git a/parser/gotest/gotest.go b/parser/gotest/gotest.go index 60f00e2..624cf37 100644 --- a/parser/gotest/gotest.go +++ b/parser/gotest/gotest.go @@ -101,15 +101,6 @@ func SetSubtestMode(mode SubtestMode) Option { } } -// NewParser returns a new Go test output parser. -func NewParser(options ...Option) *Parser { - p := &Parser{} - for _, option := range options { - option(p) - } - return p -} - // Parser is a Go test output Parser. type Parser struct { packageName string @@ -120,6 +111,15 @@ type Parser struct { events []Event } +// NewParser returns a new Go test output parser. +func NewParser(options ...Option) *Parser { + p := &Parser{} + for _, option := range options { + option(p) + } + return p +} + // Parse parses Go test output from the given io.Reader r and returns // gtr.Report. func (p *Parser) Parse(r io.Reader) (gtr.Report, error) {