use fmt pkg for Errorf call in test.go

Signed-off-by: James Sheppard <jgsheppa@protonmail.com>
pull/12063/head
James Sheppard 2 years ago
parent 288e0433db
commit 2f8911a818

@ -19,6 +19,7 @@ package test
import ( import (
"bytes" "bytes"
"flag" "flag"
"fmt"
"os" "os"
"path/filepath" "path/filepath"
@ -79,7 +80,7 @@ func compare(actual []byte, filename string) error {
} }
expected = normalize(expected) expected = normalize(expected)
if !bytes.Equal(expected, actual) { if !bytes.Equal(expected, actual) {
return errors.Errorf("does not match golden file %s\n\nWANT:\n'%s'\n\nGOT:\n'%s'", filename, expected, actual) return fmt.Errorf("does not match golden file %s\n\nWANT:\n'%s'\n\nGOT:\n'%s'", filename, expected, actual)
} }
return nil return nil
} }

Loading…
Cancel
Save