github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/compiler/testdata/go1.20.go (about) 1 package main 2 3 import "unsafe" 4 5 func unsafeSliceData(s []int) *int { 6 return unsafe.SliceData(s) 7 } 8 9 func unsafeString(ptr *byte, len int16) string { 10 return unsafe.String(ptr, len) 11 } 12 13 func unsafeStringData(s string) *byte { 14 return unsafe.StringData(s) 15 }