gitlab.com/Raven-IO/raven-delve@v1.22.4/_fixtures/cgostacktest/main.go (about)

     1  package main
     2  
     3  // #include "hello.h"
     4  import "C"
     5  
     6  import (
     7  	"fmt"
     8  	"runtime"
     9  )
    10  
    11  func main() {
    12  	runtime.Breakpoint()
    13  	C.helloworld(2)
    14  }
    15  
    16  //export helloWorld
    17  func helloWorld(x C.int) {
    18  	helloWorldS(x)
    19  }
    20  
    21  func helloWorldS(x C.int) {
    22  	runtime.Breakpoint()
    23  	C.helloworld_pt3(x - 1)
    24  }
    25  
    26  //export helloWorld2
    27  func helloWorld2(x C.int) {
    28  	runtime.Breakpoint()
    29  	fmt.Printf("hello world %d\n", x)
    30  }