...

Source file src/github.com/go-openapi/swag/string_bytes.go

Documentation: github.com/go-openapi/swag

     1  package swag
     2  
     3  import "unsafe"
     4  
     5  // hackStringBytes returns the (unsafe) underlying bytes slice of a string.
     6  func hackStringBytes(str string) []byte {
     7  	return unsafe.Slice(unsafe.StringData(str), len(str))
     8  }
     9  

View as plain text