mirror of
https://github.com/Crocmagnon/fatcontext.git
synced 2024-11-25 01:18:09 +01:00
refactor: use multi case
This commit is contained in:
parent
71bde6a5f6
commit
89a1841d57
1 changed files with 1 additions and 3 deletions
|
@ -78,9 +78,7 @@ func run(pass *analysis.Pass) (interface{}, error) {
|
|||
|
||||
func getReportMessage(node ast.Node) string {
|
||||
switch node.(type) {
|
||||
case *ast.ForStmt:
|
||||
return "nested context in loop"
|
||||
case *ast.RangeStmt:
|
||||
case *ast.ForStmt, *ast.RangeStmt:
|
||||
return "nested context in loop"
|
||||
case *ast.FuncLit:
|
||||
return "nested context in function literal"
|
||||
|
|
Loading…
Reference in a new issue