mirror of
https://github.com/kataras/iris.git
synced 2026-01-08 12:31:58 +00:00
add an example of SetContextErrorHandler
This commit is contained in:
@@ -3966,9 +3966,9 @@ func WriteJSON(ctx stdContext.Context, writer io.Writer, v interface{}, options
|
||||
}
|
||||
|
||||
// See https://golang.org/src/strings/builder.go#L45
|
||||
func bytesToString(b []byte) string {
|
||||
return *(*string)(unsafe.Pointer(&b))
|
||||
}
|
||||
// func bytesToString(b []byte) string {
|
||||
// return *(*string)(unsafe.Pointer(&b))
|
||||
// }
|
||||
|
||||
func stringToBytes(s string) []byte {
|
||||
return *(*[]byte)(unsafe.Pointer(&s))
|
||||
|
||||
Reference in New Issue
Block a user