newJsonParser function is now unexported, must use NewParser(config)

This commit is contained in:
Max U
2018-06-28 15:35:20 -07:00
parent 7f2b2a08ae
commit 4db667573a
11 changed files with 81 additions and 51 deletions

View File

@@ -172,7 +172,12 @@ func TestRunParserAndGatherJSON(t *testing.T) {
n.acc = &acc
defer close(n.done)
n.parser, _ = parsers.NewJSONParser("nats_json_test", []string{}, nil, nil)
config := &parsers.Config{
DataFormat: "json",
MetricName: "nats_json_test",
}
n.parser, _ = parsers.NewParser(config)
go n.receiver()
in <- mqttMsg(testMsgJSON)