-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1fa4249
commit 7735ef9
Showing
9 changed files
with
41 additions
and
45 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
21 changes: 21 additions & 0 deletions
21
cmd/lint-panics/analyzer/testdata/src/functions/pointers.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package functions | ||
|
||
import ( | ||
"common" | ||
) | ||
|
||
func init() { | ||
runAsync(ok) | ||
runAsyncOk(ok) | ||
} | ||
|
||
func runAsync(fn func()) { | ||
go fn() // want "missing defer call to LogOnPanic" | ||
} | ||
|
||
func runAsyncOk(fn func()) { | ||
go func() { | ||
defer common.LogOnPanic() | ||
fn() | ||
}() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters