delve/_fixtures/cgotest.go

16 lines
214 B
Go
Raw Normal View History

package main
/*
#include <stdio.h>
char* foo(void) { return "hello, world!"; }
*/
import "C"
import "fmt"
import "runtime"
func main() {
runtime.GOMAXPROCS(runtime.NumCPU())
fmt.Println(C.GoString(C.foo()))
}