Skip to content
Snippets Groups Projects
Commit a4bab762 authored by Ted Hahn's avatar Ted Hahn
Browse files

Fix nits

parent 41c5f010
No related branches found
No related tags found
No related merge requests found
......@@ -117,7 +117,7 @@ func JsonnetVM(cmd *cobra.Command) (*jsonnet.VM, error) {
for _, extvar := range extvarfiles {
kv := strings.SplitN(extvar, "=", 2)
if len(kv) != 2 {
return nil, fmt.Errorf("Failed to parse ext-str-file: missing '=' in %s", extvar)
return nil, fmt.Errorf("Failed to parse %s: missing '=' in %s", flagExtVarFile, extvar)
}
v, err := ioutil.ReadFile(kv[1])
if err != nil {
......@@ -152,7 +152,7 @@ func JsonnetVM(cmd *cobra.Command) (*jsonnet.VM, error) {
for _, tlavar := range tlavarfiles {
kv := strings.SplitN(tlavar, "=", 2)
if len(kv) != 2 {
return nil, fmt.Errorf("Failed to parse tla-str-file: missing '=' in %s", tlavar)
return nil, fmt.Errorf("Failed to parse %s: missing '=' in %s", flagTlaVarFile, tlavar)
}
v, err := ioutil.ReadFile(kv[1])
if err != nil {
......
......@@ -48,7 +48,7 @@ func TestShow(t *testing.T) {
"string": "bar",
"notAVal": "aVal",
"notAnotherVal": "aVal2",
"filevar": "foo",
"filevar": "foo\n",
"array": ["one", 2, [3]],
"object": {"foo": "bar"}
}
......@@ -69,7 +69,7 @@ func TestShow(t *testing.T) {
filepath.FromSlash("../testdata/test.jsonnet"),
"-V", "aVar=aVal",
"-V", "anVar",
"--ext-str-file", "filevar=../testdata/extvar.file",
"--ext-str-file", "filevar=" + filepath.FromSlash("../testdata/extvar.file"),
})
t.Log("output is", output)
......
foo
\ No newline at end of file
foo
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