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

Commit

Permalink
Review fix
Browse files Browse the repository at this point in the history
  • Loading branch information
segevfiner committed Dec 26, 2018
1 parent 6686fab commit af672b8
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions internal/suggest/candidate.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,10 @@ func (b *candidateCollector) asCandidate(obj types.Object) Candidate {
}

var receiver string
if sig, ok := typ.(*types.Signature); ok {
if sig.Recv() != nil {
receiver = types.TypeString(sig.Recv().Type(), func(*types.Package) string {
return ""
})
}
if sig, ok := typ.(*types.Signature); ok && sig.Recv() != nil {
receiver = types.TypeString(sig.Recv().Type(), func(*types.Package) string {
return ""
})
}

return Candidate{
Expand Down

0 comments on commit af672b8

Please sign in to comment.