aboutsummaryrefslogtreecommitdiffstats
path: root/defererr.go
diff options
context:
space:
mode:
Diffstat (limited to 'defererr.go')
-rw-r--r--defererr.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/defererr.go b/defererr.go
index 3e54aba..77a872d 100644
--- a/defererr.go
+++ b/defererr.go
@@ -2,8 +2,10 @@
package defererr
import (
+ "bytes"
"fmt"
"go/ast"
+ "go/printer"
"go/token"
"go/types"
@@ -56,6 +58,13 @@ func checkFunctions(pass *analysis.Pass, node ast.Node) {
return true
}
+ var buf bytes.Buffer
+ err := printer.Fprint(&buf, pass.Fset, funcDecl)
+ if err != nil {
+ panic(err)
+ }
+ fmt.Println(buf.String())
+
if funcDecl.Type.Results == nil {
return true
}