mirror of
https://github.com/golang/go
synced 2024-11-05 11:36:10 -07:00
74a6bbb346
In the previous implementation, we always created a default value for each type in the struct or return statement in fillstruct and fillreturns, respectively. Now, we try to find a variable in scope that matches the expected type. If we find multiple matches, we choose the variable that is named most similarly to the type. If we do not find a variable that matches, we maintain the previous functionality. Change-Id: I3acb7e27476afaa71aaff9ffb69445913575e2b6 Reviewed-on: https://go-review.googlesource.com/c/tools/+/245130 Run-TryBot: Josh Baum <joshbaum@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org> |
||
---|---|---|
.. | ||
analysis.go |