Commit d2e8bf47 authored by Matthew Hooker's avatar Matthew Hooker

reuse jsonString instead of opaque result var.

parent 9537f085
......@@ -65,12 +65,12 @@ func TestJsonTemplateProcess_user(t *testing.T) {
}
var jsonString = string(jsonBytes)
result, err := tpl.Process(jsonString, nil)
jsonString, err = tpl.Process(jsonString, nil)
if err != nil {
t.Fatalf("err: %s", err)
}
var dat map[string]map[string]interface{}
if err := json.Unmarshal([]byte(result), &dat); err != nil {
if err := json.Unmarshal([]byte(jsonString), &dat); err != nil {
t.Fatalf("err: %s", err)
}
......
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