modernc.org/gc@v1.0.1-0.20240304020402-f0dba7c97c2b/testdata/errchk/test/linkname.dir/linkname2.go (about)

     1  package y
     2  
     3  import _ "unsafe"
     4  
     5  //go:linkname byteIndex linkname1.indexByte
     6  func byteIndex(xs []byte, b byte) int
     7  
     8  func ContainsSlash(data []byte) bool { // ERROR "leaking param: data" "can inline ContainsSlash"
     9  	if byteIndex(data, '/') != -1 {
    10  		return true
    11  	}
    12  	return false
    13  }