mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-17 22:32:26 +08:00
Merge branch 'master' into legec-errors-unwrap
This commit is contained in:
commit
41c0dff1ed
@ -178,8 +178,8 @@ Gin uses a custom version of [HttpRouter](https://github.com/julienschmidt/httpr
|
||||
|
||||
- [x] Zero allocation router.
|
||||
- [x] Still the fastest http router and framework. From routing to writing.
|
||||
- [x] Complete suite of unit tests
|
||||
- [x] Battle tested
|
||||
- [x] Complete suite of unit tests.
|
||||
- [x] Battle tested.
|
||||
- [x] API frozen, new releases will not break your code.
|
||||
|
||||
## Build with [jsoniter](https://github.com/json-iterator/go)
|
||||
|
@ -7,6 +7,8 @@ package render
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin/internal/bytesconv"
|
||||
)
|
||||
|
||||
// String contains the given interface object slice and its format.
|
||||
@ -34,6 +36,6 @@ func WriteString(w http.ResponseWriter, format string, data []interface{}) (err
|
||||
_, err = fmt.Fprintf(w, format, data...)
|
||||
return
|
||||
}
|
||||
_, err = w.Write([]byte(format))
|
||||
_, err = w.Write(bytesconv.StringToBytes(format))
|
||||
return
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user