gostatement is an analyzer checking for occurrence of go
statements. You may want to use a custom
func wrapping the statement utilizing recover, logging, metrics...
go install github.com/fpuc/gostatement/cmd/gostatement
package main
import (
"fmt"
"os"
"testing"
)
func main() {
go func() {
// foo
}()
}
go vet -vettool=$(which gostatement) ./...
./main.go:4:2: go statement found