ctxfirst

package module
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2026 License: MIT Imports: 6 Imported by: 0

README

Documentation

Overview

Package ctxfirst provides a go/analysis analyzer enforcing the gomatic Go idiom that a context.Context parameter is always the first parameter.

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name:     "ctxfirst",
	Doc:      "reports context.Context parameters that are not the first parameter",
	Requires: []*analysis.Analyzer{inspect.Analyzer},
	Run:      run,
}

Analyzer reports context.Context parameters that are not first.

View Source
var Registration = goyze.Registration{
	Name:       "ctxfirst",
	Categories: []goyze.Category{"patterns"},
	URL:        "https://docs.gomatic.dev/yze/ctxfirst",
	Analyzer:   Analyzer,
}

Registration declares this analyzer to the yze framework.

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
cmd
yze-go-ctxfirst command
Command yze-go-ctxfirst runs the ctxfirst analyzer as a standalone go/analysis checker (text and -json output, and as a `go vet -vettool`).
Command yze-go-ctxfirst runs the ctxfirst analyzer as a standalone go/analysis checker (text and -json output, and as a `go vet -vettool`).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL