mirror of
https://github.com/chai2010/advanced-go-programming-book.git
synced 2025-05-24 20:52:22 +00:00
23 lines
270 B
Go
23 lines
270 B
Go
package main
|
|
|
|
import "C"
|
|
|
|
func main() {
|
|
helloString("hello") // _GoString_
|
|
}
|
|
|
|
//export helloInt
|
|
func helloInt(s int) {
|
|
println(s)
|
|
}
|
|
|
|
//export helloString
|
|
func helloString(s string) {
|
|
println(s)
|
|
}
|
|
|
|
//export helloSlice
|
|
func helloSlice(s []byte) {
|
|
println(string(s))
|
|
}
|