Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/eatonphil/deferlint

Linter for finding defer statements in Go loops
https://github.com/eatonphil/deferlint

Last synced: 23 days ago
JSON representation

Linter for finding defer statements in Go loops

Awesome Lists containing this project

README

        

# deferlint

This package warns when defer is used within loops.

## Example

```bash
$ go get github.com/eatonphil/deferlint
$ go vet -vettool=/Users/philipeaton/go/bin/deferlint ./tests
# github.com/eatonphil/deferlint/tests
tests/deferloop.go:7:3: defer in loop found "defer f()"
```

## References

https://github.com/fatih/addlint