Standard library / runtime
runtime.NumCgoCall()
Reports the number of cgo calls made by the process. This example does not require cgo. Expected stdout: 'true\n'.
Formal Syntax & Structure
go syntaxgo
func NumCgoCall() int64Return Value
int64
Cumulative cgo call count.
Working Example
Example Snippetgo
package main
import ( "fmt" "runtime")
func main() { fmt.Println(runtime.NumCgoCall() >= 0) }