Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use encode replace json marshal increase json encoder speed #1546

Merged
merged 10 commits into from
May 21, 2019
Prev Previous commit
Next Next commit
Update context_test.go
  • Loading branch information
thinkerou authored May 21, 2019
commit 9198d6acd0250f68fd97dae48a8660d3a99635d3
2 changes: 1 addition & 1 deletion context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1272,7 +1272,7 @@ func TestContextAbortWithStatusJSON(t *testing.T) {
_, err := buf.ReadFrom(w.Body)
assert.NoError(t, err)
jsonStringBody := buf.String()
assert.Equal(t, fmt.Sprint(`{"foo":"fooValue","bar":"barValue"}\n`), jsonStringBody)
assert.Equal(t, fmt.Sprint(`{"foo":"fooValue","bar":"barValue"}\\n`), jsonStringBody)
}

func TestContextError(t *testing.T) {
Expand Down