Skip to content

Commit

Permalink
errcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthur1 committed Nov 23, 2023
1 parent fa0fed9 commit 7a4417d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions internal/scenariotest/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,22 @@ func (r *Runner) Run(ctx context.Context) (*Result, error) {
return nil, err
}

err = o.Run(ctx)
_err := o.Run(ctx)
res := o.Result()

var (
buf bytes.Buffer
profile stopw.Span
)
o.DumpProfile(&buf)
json.NewDecoder(&buf).Decode(&profile)
if err := o.DumpProfile(&buf); err != nil {
return nil, err
}
if err := json.NewDecoder(&buf).Decode(&profile); err != nil {
return nil, err
}

result := &Result{
Err: err,
Err: _err,
ElapsedTime: profile.Elapsed,
Description: res.Desc,
Timestamp: profile.StartedAt,
Expand Down

0 comments on commit 7a4417d

Please sign in to comment.