Movatterモバイル変換


[0]ホーム

URL:


lostcancel

package
v0.37.0Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2025 License:BSD-3-ClauseImports:12Imported by:329

Details

Repository

cs.opensource.google/go/x/tools

Links

Documentation

Overview

Package lostcancel defines an Analyzer that checks for failure tocall a context cancellation function.

Analyzer lostcancel

lostcancel: check cancel func returned by context.WithCancel is called

The cancellation function returned by context.WithCancel, WithTimeout,WithDeadline and variants such as WithCancelCause must be called,or the new context will remain live until its parent context is cancelled.(The background context is never cancelled.)

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{Name: "lostcancel",Doc:analysisutil.MustExtractDoc(doc, "lostcancel"),URL:  "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/lostcancel",Run:  run,Requires: []*analysis.Analyzer{inspect.Analyzer,ctrlflow.Analyzer,},}

Functions

This section is empty.

Types

This section is empty.

Source Files

View all Source files

Directories

PathSynopsis
cmd
lostcancelcommand
The lostcancel command applies the golang.org/x/tools/go/analysis/passes/lostcancel analysis to the specified packages of Go source code.
The lostcancel command applies the golang.org/x/tools/go/analysis/passes/lostcancel analysis to the specified packages of Go source code.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp