Fix panic when handling string fields with escapes (#3188)

This commit is contained in:
Daniel Nelson
2017-08-30 21:16:37 -07:00
committed by GitHub
parent 19f3264073
commit 28d16188b3
4 changed files with 56 additions and 19 deletions

View File

@@ -258,6 +258,7 @@ func TestNewMetric_Fields(t *testing.T) {
"quote_string": `x"y`,
"backslash_quote_string": `x\"y`,
"backslash": `x\y`,
"ends_with_backslash": `x\`,
}
m, err := New("cpu", tags, fields, now)
assert.NoError(t, err)