From 7875e13422c58479f2267d02ac15ba5b7f87426e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Stemmer?= Date: Sat, 25 Jun 2022 23:54:07 +0100 Subject: [PATCH] parser/gotest: Move NewParser function below Parser struct --- parser/gotest/gotest.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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) {