github.com/neilgarb/delve@v1.9.2-nobreaks/_fixtures/cgotest.go (about) 1 package main 2 3 /* 4 #include <stdio.h> 5 char* foo(void) { return "hello, world!"; } 6 */ 7 import "C" 8 9 import "fmt" 10 import "runtime" 11 12 func main() { 13 runtime.GOMAXPROCS(runtime.NumCPU()) 14 fmt.Println(C.GoString(C.foo())) 15 }