nuclei/v2/pkg/protocols/common/tostring/tostring.go

9 lines
187 B
Go
Raw Normal View History

2021-01-01 09:58:28 +00:00
package tostring
import "unsafe"
// UnsafeToString converts byte slice to string with zero allocations
func UnsafeToString(bs []byte) string {
return *(*string)(unsafe.Pointer(&bs))
}