env GOPRIVATE=test/main

garble build
exec ./main
cmp stderr main.stderr
binsubstr main$exe 'privateAdd'

[short] stop # no need to verify this with -short

env GOPRIVATE=*
garble build
exec ./main
cmp stderr main.stderr
binsubstr main$exe 'privateAdd'
env GOPRIVATE=test/main

garble -tiny build
exec ./main
cmp stderr main.stderr
binsubstr main$exe 'privateAdd'

go build
exec ./main
cmp stderr main.stderr

-- go.mod --
module test/main

go 1.16
-- main.go --
package main

import "os/user"

/*
static int privateAdd(int a, int b) {
	return a + b;
}

extern void goCallback();

static void callGoCallback() {
	goCallback();
}
*/
import "C"

func main() {
	println(C.privateAdd(C.int(1), C.int(2)))
	_, _ = user.Current()

	C.callGoCallback()
}

//export goCallback
func goCallback() {
	println("go callback")
}
-- main.stderr --
3
go callback
