mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-18 14:52:18 +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] Zero allocation router.
|
||||||
- [x] Still the fastest http router and framework. From routing to writing.
|
- [x] Still the fastest http router and framework. From routing to writing.
|
||||||
- [x] Complete suite of unit tests
|
- [x] Complete suite of unit tests.
|
||||||
- [x] Battle tested
|
- [x] Battle tested.
|
||||||
- [x] API frozen, new releases will not break your code.
|
- [x] API frozen, new releases will not break your code.
|
||||||
|
|
||||||
## Build with [jsoniter](https://github.com/json-iterator/go)
|
## Build with [jsoniter](https://github.com/json-iterator/go)
|
||||||
|
@ -7,6 +7,8 @@ package render
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/gin-gonic/gin/internal/bytesconv"
|
||||||
)
|
)
|
||||||
|
|
||||||
// String contains the given interface object slice and its format.
|
// 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...)
|
_, err = fmt.Fprintf(w, format, data...)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
_, err = w.Write([]byte(format))
|
_, err = w.Write(bytesconv.StringToBytes(format))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user