implemented HTTP 1.0/1.1 server
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
package string_helper
|
||||
|
||||
import "unsafe"
|
||||
|
||||
func UnsafeGetStrBytes(s string) []byte {
|
||||
pointr := unsafe.StringData(s)
|
||||
return unsafe.Slice(pointr, len(s))
|
||||
}
|
||||
|
||||
func UnsafeBytesToStr(b []byte) string {
|
||||
pointr := unsafe.SliceData(b)
|
||||
return unsafe.String(pointr, len(b))
|
||||
}
|
||||
Reference in New Issue
Block a user