mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-17 22:32:26 +08:00
unnecessary use of fmt.Sprint
This commit is contained in:
parent
9410bd0b86
commit
a52228ee8a
@ -1329,7 +1329,8 @@ func TestContextAbortWithStatusJSON(t *testing.T) {
|
|||||||
_, err := buf.ReadFrom(w.Body)
|
_, err := buf.ReadFrom(w.Body)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
jsonStringBody := buf.String()
|
jsonStringBody := buf.String()
|
||||||
assert.Equal(t, fmt.Sprint("{\"foo\":\"fooValue\",\"bar\":\"barValue\"}"), jsonStringBody)
|
// S1039: unnecessary use of fmt.Sprint (gosimple)
|
||||||
|
assert.Equal(t, `{"foo":"fooValue","bar":"barValue"}`, jsonStringBody)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestContextError(t *testing.T) {
|
func TestContextError(t *testing.T) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user