2021-06-07 22:33:34 +03:00
|
|
|
package main
|
|
|
|
|
2021-07-21 15:02:04 +03:00
|
|
|
import (
|
|
|
|
_ "github.com/mattn/go-sqlite3"
|
|
|
|
)
|
|
|
|
|
2021-06-07 22:33:34 +03:00
|
|
|
// #include <stdio.h>
|
2022-01-28 15:49:24 +02:00
|
|
|
// char* hello() { return "hello, world"; }
|
|
|
|
// void printhello() { printf("%s\n", 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
|
|
|
}
|