Compare commits

..

1 Commits

Author SHA1 Message Date
Andreas Deininger 43f3c37351
Merge 360c8e1074 into 6ee9f877d6 2023-11-17 09:10:27 +00:00
2 changed files with 0 additions and 5 deletions

View File

@ -1926,10 +1926,6 @@ func AppendJSONString(dst []byte, s string) []byte {
if s[i] < ' ' { if s[i] < ' ' {
dst = append(dst, '\\') dst = append(dst, '\\')
switch s[i] { switch s[i] {
case '\b':
dst = append(dst, 'b')
case '\f':
dst = append(dst, 'f')
case '\n': case '\n':
dst = append(dst, 'n') dst = append(dst, 'n')
case '\r': case '\r':

View File

@ -2578,7 +2578,6 @@ func TestJSONString(t *testing.T) {
testJSONString(t, s) testJSONString(t, s)
testJSONString(t, "R\xfd\xfc\a!\x82eO\x16?_\x0f\x9ab\x1dr") testJSONString(t, "R\xfd\xfc\a!\x82eO\x16?_\x0f\x9ab\x1dr")
testJSONString(t, "_\xb9\v\xad\xb3|X!\xb6\xd9U&\xa4\x1a\x95\x04") testJSONString(t, "_\xb9\v\xad\xb3|X!\xb6\xd9U&\xa4\x1a\x95\x04")
testJSONString(t, "\b\f")
rng := rand.New(rand.NewSource(time.Now().UnixNano())) rng := rand.New(rand.NewSource(time.Now().UnixNano()))
start := time.Now() start := time.Now()
var buf [16]byte var buf [16]byte