From 5b19e2887a845da64f4134c01a7611986c2a20e8 Mon Sep 17 00:00:00 2001 From: Tiago Katcipis Date: Mon, 1 Jan 2024 19:17:56 +0100 Subject: [PATCH] chore: improve error message by wrapping error --- benchcheck.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/benchcheck.go b/benchcheck.go index a0c76bc..e9eb36f 100644 --- a/benchcheck.go +++ b/benchcheck.go @@ -237,12 +237,12 @@ func Stat(oldres BenchResults, newres BenchResults) ([]StatResult, error) { func StatModule(runBench BenchRunner, name string, oldversion, newversion string) ([]StatResult, error) { oldresults, err := benchModule(runBench, name, oldversion) if err != nil { - return nil, fmt.Errorf("running bench for old module: %v", err) + return nil, fmt.Errorf("running bench for old module: %w", err) } newresults, err := benchModule(runBench, name, newversion) if err != nil { - return nil, fmt.Errorf("running bench for new module: %v", err) + return nil, fmt.Errorf("running bench for new module: %w", err) } return Stat(oldresults, newresults)