1
0
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:
Gerasimos (Makis) Maropoulos
2022-04-13 01:11:31 +03:00
parent ae828d8db9
commit 3582427df6
2 changed files with 14 additions and 6 deletions

View File

@@ -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))