You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
x/tools: downgrade token.FileSet parameters to token.File
Various functions are inherently concerned with exactly one
file. By passing a token.File instead of a whole FileSet
as a parameter, this is more obvious at a glance; and a
callee can't modify a FileSet it doesn't have.
This CL does this for a number of internal functions.
(What's the downside? Formatting an ast.Node does require
a FileSet, even when the tree contains nodes only from one
file, as usual. However, we can construct an ephemeral
singleton FileSet using AddExistingFiles should the need
arise.)
Change-Id: If8a38af220f105f581ffb4fd7d554f795b55847c
Reviewed-on: https://go-review.googlesource.com/c/tools/+/710255
Reviewed-by: Robert Findley <[email protected]>
Commit-Queue: Alan Donovan <[email protected]>
Auto-Submit: Alan Donovan <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
0 commit comments