Commit 518c888d authored by Angus Lees's avatar Angus Lees Committed by GitHub
Browse files

Prefer `fmt.Errorf` for generated error messages

parent b9b50f0a
......@@ -3,7 +3,6 @@ package cmd
import (
"bytes"
"encoding/json"
"errors"
goflag "flag"
"fmt"
"os"
......@@ -87,7 +86,7 @@ func JsonnetVM(cmd *cobra.Command) (*jsonnet.VM, error) {
for _, extvar := range extvars {
kv := strings.SplitN(extvar, "=", 2)
if len(kv) != 2 {
return nil, errors.New("Failed to parse extvar: missing '=' in " + extvar)
return nil, fmt.Errorf("Failed to parse extvar: missing '=' in %s", extvar)
}
vm.ExtVar(kv[0], kv[1])
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment