...

Package cgocall

import "golang.org/x/tools/go/analysis/passes/cgocall"
Overview
Index

Overview ▾

Package cgocall defines an Analyzer that detects some violations of the cgo pointer passing rules.

Index ▾

Package files

cgocall.go

Constants

const Doc = `detect some violations of the cgo pointer passing rules

Check for invalid cgo pointer passing.
This looks for code that uses cgo to call C code passing values
whose types are almost always invalid according to the cgo pointer
sharing rules.
Specifically, it warns about attempts to pass a Go chan, map, func,
or slice to C, either directly, or via a pointer, array, or struct.`

Variables

var Analyzer = &analysis.Analyzer{
    Name:             "cgocall",
    Doc:              Doc,
    RunDespiteErrors: true,
    Run:              run,
}