Skip to content

Commit 4ce9105

Browse files
committed
parser/gotest: timestampFunc should always be set, skip nil check
1 parent 1c826cb commit 4ce9105

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

parser/gotest/report_builder.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -187,12 +187,9 @@ func (b *reportBuilder) CreateBuildError(packageName string) {
187187
// so far. Afterwards all state is reset.
188188
func (b *reportBuilder) CreatePackage(name, result string, duration time.Duration, data string) {
189189
pkg := gtr.Package{
190-
Name: name,
191-
Duration: duration,
192-
}
193-
194-
if b.timestampFunc != nil {
195-
pkg.Timestamp = b.timestampFunc()
190+
Name: name,
191+
Duration: duration,
192+
Timestamp: b.timestampFunc(),
196193
}
197194

198195
// Build errors are treated somewhat differently. Rather than having a

0 commit comments

Comments
 (0)