mirror of
https://github.com/crazy-max/diun.git
synced 2024-12-22 19:38:28 +00:00
9 lines
206 B
Go
9 lines
206 B
Go
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))
|
|
}
|