github.com/giovannyortegon/go@v0.0.0-20220115155912-8890063f5bdd/src/MasterGO/Chap02-GoInternals/cGo.go (about)

     1  package main
     2  
     3  /*
     4  #include<stdio.h>
     5  void callC()
     6  {
     7  	printf("Calling C code!\n");
     8  }
     9  */
    10  import "C"
    11  import "fmt"
    12  
    13  func main() {
    14  	fmt.Println("A Go statement!")
    15  	C.callC()
    16  	fmt.Println("Another Go statement")
    17  }