test: move cgo demo into _testgo, and make links

This commit is contained in:
Li Jie
2024-11-27 17:14:19 +08:00
parent 90763de93c
commit e46b3e24d6
27 changed files with 595 additions and 203 deletions

View File

@@ -1,16 +0,0 @@
package main
/*
#cgo CFLAGS: -DFOO
#include <stdio.h>
#include "foo.h"
static void foo(Foo* f) {
printf("foo in bar: %d\n", f->a);
}
*/
import "C"
func Foo(f *C.Foo) {
C.print_foo(f)
C.foo(f)
}