From 910a6937c0201acbaf6beda21e01e74966abb690 Mon Sep 17 00:00:00 2001 From: Maas Lalani Date: Sat, 29 Oct 2022 19:59:15 -0400 Subject: [PATCH] refactor: use fmt.Errorf for dimensions error message --- evaluator.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evaluator.go b/evaluator.go index 1d2493094..00108d149 100644 --- a/evaluator.go +++ b/evaluator.go @@ -47,7 +47,7 @@ func Evaluate(tape string, out io.Writer, opts ...EvaluatorOption) error { h, w, padding := v.Options.Video.Height, v.Options.Video.Width, v.Options.Video.Padding if h < 2*padding || w < 2*padding { - return errors.New("height and width must be greater than " + fmt.Sprint(2*padding)) + return fmt.Errorf("height and width must be greater than %d", 2*padding) } // Setup the terminal session so we can start executing commands.