1
Fork 0
hermetic_cc_toolchain/test/hello.go

19 lines
269 B
Go
Raw Normal View History

2021-06-07 22:33:34 +03:00
package main
import (
_ "github.com/mattn/go-sqlite3"
)
2021-06-07 22:33:34 +03:00
// #include <stdio.h>
2022-01-28 14:40:03 +02:00
// char* hello() { return "hello, world\n"; }
// void printhello() { printf(hello()); }
2021-06-07 22:33:34 +03:00
import "C"
func main() {
2022-01-28 14:40:03 +02:00
C.printhello()
}
func chello() string {
return C.GoString(C.hello())
2021-06-07 22:33:34 +03:00
}