Skip to content

Commit

Permalink
refactor: use fmt.Errorf for dimensions error message
Browse files Browse the repository at this point in the history
  • Loading branch information
maaslalani committed Oct 29, 2022
1 parent 4a06b56 commit 910a693
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion evaluator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 910a693

Please sign in to comment.