- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 25 for lostcancel (0.15 sec)
-
src/cmd/vet/testdata/lostcancel/lostcancel.go
// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package lostcancel import "context" func _() { var _, cancel = context.WithCancel(context.Background()) // ERROR "the cancel function is not used on all paths \(possible context leak\)" if false { _ = cancel }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Feb 20 15:46:42 UTC 2019 - 475 bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/lostcancel/lostcancel.go
"golang.org/x/tools/go/cfg" ) //go:embed doc.go var doc string 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, }, } const debug = false
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jan 22 19:00:13 UTC 2024 - 9K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/lostcancel/doc.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package lostcancel defines an Analyzer that checks for failure to // call a context cancellation function. // // # Analyzer lostcancel // // lostcancel: check cancel func returned by context.WithCancel is called // // The cancellation function returned by context.WithCancel, WithTimeout,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 09 01:28:01 UTC 2023 - 632 bytes - Viewed (0) -
src/cmd/vet/main.go
"golang.org/x/tools/go/analysis/passes/httpresponse" "golang.org/x/tools/go/analysis/passes/ifaceassert" "golang.org/x/tools/go/analysis/passes/loopclosure" "golang.org/x/tools/go/analysis/passes/lostcancel" "golang.org/x/tools/go/analysis/passes/nilfunc" "golang.org/x/tools/go/analysis/passes/printf" "golang.org/x/tools/go/analysis/passes/shift" "golang.org/x/tools/go/analysis/passes/sigchanyzer"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 19:41:17 UTC 2024 - 2.9K bytes - Viewed (0) -
src/cmd/go/internal/test/flagdefs.go
"defers": true, "directive": true, "errorsas": true, "framepointer": true, "httpresponse": true, "ifaceassert": true, "loopclosure": true, "lostcancel": true, "methods": true, "nilfunc": true, "printf": true, "rangeloops": true, "shift": true, "sigchanyzer": true, "slog": true,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 01:02:40 UTC 2024 - 2.2K bytes - Viewed (0) -
src/cmd/internal/test2json/testdata/vet.test
--- PASS: TestVet/4 (0.16s) vet_test.go:114: files: ["testdata/copylock.go" "testdata/print.go"] --- PASS: TestVet/1 (0.07s) vet_test.go:114: files: ["testdata/atomic.go" "testdata/lostcancel.go" "testdata/unsafeptr.go"] --- PASS: TestVet/7 (0.19s) vet_test.go:114: files: ["testdata/deadcode.go" "testdata/shift.go"] --- PASS: TestVetDirs (0.01s) --- PASS: TestVetDirs/testingpkg (0.06s)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 01 16:13:47 UTC 2020 - 3.1K bytes - Viewed (0) -
src/cmd/internal/test2json/testdata/smiley.test
--- PASS: Test☺☹/4 (0.16s) vet_test.go:114: φιλεσ: ["testdata/copylock.go" "testdata/print.go"] --- PASS: Test☺☹/1 (0.07s) vet_test.go:114: φιλεσ: ["testdata/atomic.go" "testdata/lostcancel.go" "testdata/unsafeptr.go"] --- PASS: Test☺☹/7 (0.19s) vet_test.go:114: φιλεσ: ["testdata/deadcode.go" "testdata/shift.go"] --- PASS: Test☺☹Dirs (0.01s) --- PASS: Test☺☹Dirs/testingpkg (0.06s)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 01 16:13:47 UTC 2020 - 3.3K bytes - Viewed (0) -
src/cmd/vet/doc.go
httpresponse check for mistakes using HTTP responses ifaceassert detect impossible interface-to-interface type assertions loopclosure check references to loop variables from within nested functions lostcancel check cancel func returned by context.WithCancel is called nilfunc check for useless comparisons between functions and nil printf check consistency of Printf format strings and arguments
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Nov 21 00:17:30 UTC 2023 - 3.8K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/unusedresult/unusedresult.go
// ... // } // // ignoringTheErrorWouldBeVeryBad() // oops // // List standard library functions here. // The context.With{Cancel,Deadline,Timeout} entries are // effectively redundant wrt the lostcancel analyzer. funcs = stringSetFlag{ "context.WithCancel": true, "context.WithDeadline": true, "context.WithTimeout": true, "context.WithValue": true, "errors.New": true,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jan 22 19:00:13 UTC 2024 - 4.5K bytes - Viewed (0) -
src/cmd/vendor/modules.txt
golang.org/x/tools/go/analysis/passes/ifaceassert golang.org/x/tools/go/analysis/passes/inspect golang.org/x/tools/go/analysis/passes/internal/analysisutil golang.org/x/tools/go/analysis/passes/loopclosure golang.org/x/tools/go/analysis/passes/lostcancel golang.org/x/tools/go/analysis/passes/nilfunc golang.org/x/tools/go/analysis/passes/printf golang.org/x/tools/go/analysis/passes/shift golang.org/x/tools/go/analysis/passes/sigchanyzer
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 16:19:04 UTC 2024 - 4.8K bytes - Viewed (0)