...

Package cgocall

import "cmd/vendor/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.

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,
    URL:              "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/cgocall",
    RunDespiteErrors: true,
    Run:              run,
}