Skip to content

Commit

Permalink
Support function literals for multi-func
Browse files Browse the repository at this point in the history
  • Loading branch information
NiseVoid committed Feb 15, 2022
1 parent b0ba492 commit a14a292
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ func (v *visitor) Visit(node ast.Node) ast.Visitor {
checkMultiLine(v, stmt.Body, stmt.Cond)
}

if stmt, ok := node.(*ast.FuncLit); ok && v.settings.MultiFunc {
checkMultiLine(v, stmt.Body, stmt.Type)
}

if stmt, ok := node.(*ast.FuncDecl); ok && v.settings.MultiFunc {
checkMultiLine(v, stmt.Body, stmt.Type)
}
Expand Down

0 comments on commit a14a292

Please sign in to comment.