Files
kubesphere/vendor/github.com/go-openapi/swag/string_bytes.go
2025-05-27 16:03:39 +08:00

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))
}