gostatement

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2021 License: MIT Imports: 4 Imported by: 0

README

gostatement

test_and_lint

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...

Instruction

go install github.com/fpuc/gostatement/cmd/gostatement

Usage

package main

import (
	"fmt"
	"os"
	"testing"
)

func main() {
    go func() {
        // foo
    }()
}
go vet -vettool=$(which gostatement) ./...

./main.go:4:2: go statement found

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name:     "gostatement",
	Doc:      "gostatement is an analyzer checking for occurrence of `go` statements",
	Run:      run,
	Requires: []*analysis.Analyzer{inspect.Analyzer},
}

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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