Skip to content
This repository has been archived by the owner on Oct 19, 2022. It is now read-only.

Commit

Permalink
I fix nil pointer reference error. (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
sivchari authored May 13, 2022
1 parent 33099fb commit c5661ef
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nosnakecase.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ func run(pass *analysis.Pass) (interface{}, error) {

go func() {
defer wg.Done()
if n.Body.List == nil {
return
}
for _, list := range n.Body.List {
switch l := list.(type) {
case *ast.AssignStmt:
Expand Down

0 comments on commit c5661ef

Please sign in to comment.