1
0
mirror of https://github.com/golang/go synced 2024-11-18 14:34:39 -07:00
go/go/types
Dominik Honnef 26f46d2f7e go/types/objectpath: cache result of call to scope.Names
Names is a somewhat expensive method, which sorts the returned slice.
Avoiding the extra call helps clients that use objectpath a lot.

Change-Id: I49a3445bb4f0056d1b915a2104e136925ee9dbf9
Reviewed-on: https://go-review.googlesource.com/c/tools/+/231518
Run-TryBot: Dominik Honnef <dominik@honnef.co>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
2020-05-05 02:31:15 +00:00
..
objectpath go/types/objectpath: cache result of call to scope.Names 2020-05-05 02:31:15 +00:00
typeutil all: fix some staticcheck errors 2020-01-29 04:53:41 +00:00