forked from ebhomengo/niki
1
0
Fork 0
niki/vendor/github.com/go-openapi/swag/string_bytes.go

9 lines
206 B
Go
Raw Normal View History

2024-05-14 13:07:09 +00:00
package swag
import "unsafe"
// hackStringBytes returns the (unsafe) underlying bytes slice of a string.
func hackStringBytes(str string) []byte {
return unsafe.Slice(unsafe.StringData(str), len(str))
}