ctxtodo

package
v0.0.0-...-28bfff4 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package ctxtodo implements a Go Analyzer for detecting context.TODO() and plumbing contexts to it.

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name:  "ctxtodo",
	Doc:   "Find calls of the context.TODO function in need of plumbing.",
	Run:   run,
	Flags: flags(),

	FactTypes: []analysis.Fact{
		new(NeedsContext),
	},

	RunDespiteErrors: true,
}

Analyzer provides the ctxtodo analyzer.

View Source
var (
	// ModuleCache is a prefix that will cause suggested fixes to be ignored.
	ModuleCache string
)

Functions

This section is empty.

Types

type NeedsContext

type NeedsContext struct{}

NeedsContext indicates that an exported function is having a context added by the ctxtodo analyzer, so that other packages can understand the need to add a context parameter.

func (NeedsContext) AFact

func (NeedsContext) AFact()

func (NeedsContext) String

func (NeedsContext) String() string

Jump to

Keyboard shortcuts

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