mirror of https://github.com/daffainfo/nuclei.git
9 lines
187 B
Go
9 lines
187 B
Go
|
package tostring
|
||
|
|
||
|
import "unsafe"
|
||
|
|
||
|
// UnsafeToString converts byte slice to string with zero allocations
|
||
|
func UnsafeToString(bs []byte) string {
|
||
|
return *(*string)(unsafe.Pointer(&bs))
|
||
|
}
|