mirror of
https://github.com/mgechev/revive.git
synced 2024-11-30 08:57:07 +02:00
29 lines
323 B
Go
29 lines
323 B
Go
package fixtures
|
|
|
|
import "errors"
|
|
|
|
type tt int
|
|
|
|
func (t tt) m() {}
|
|
|
|
func deferrer3() {
|
|
for {
|
|
go func() {
|
|
defer println()
|
|
}()
|
|
defer func() {}() // MATCH /prefer not to defer inside loops/
|
|
}
|
|
|
|
defer tt.m()
|
|
|
|
defer func() error {
|
|
return errors.New("error")
|
|
}()
|
|
|
|
defer recover()
|
|
|
|
recover()
|
|
|
|
defer deferrer()
|
|
}
|