mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
std,cmd: go fix -any std cmd
This change mechanically replaces all occurrences of interface{}
by 'any' (where deemed safe by the 'any' modernizer) throughout
std and cmd, minus their vendor trees.
Since this fix is relatively numerous, it gets its own CL.
Also, 'go generate go/types'.
Change-Id: I14a6b52856c3291c1d27935409bca8d5fd4242a2
Reviewed-on: https://go-review.googlesource.com/c/go/+/719702
Commit-Queue: Alan Donovan <adonovan@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Alan Donovan <adonovan@google.com>
This commit is contained in:
parent
2263d4aabd
commit
4bfc3a9d14
99 changed files with 282 additions and 284 deletions
|
|
@ -68,7 +68,7 @@ func predefine(defines flags.MultiFlag) map[string]*Macro {
|
|||
|
||||
var panicOnError bool // For testing.
|
||||
|
||||
func (in *Input) Error(args ...interface{}) {
|
||||
func (in *Input) Error(args ...any) {
|
||||
if panicOnError {
|
||||
panic(fmt.Errorf("%s:%d: %s", in.File(), in.Line(), fmt.Sprintln(args...)))
|
||||
}
|
||||
|
|
@ -77,7 +77,7 @@ func (in *Input) Error(args ...interface{}) {
|
|||
}
|
||||
|
||||
// expectText is like Error but adds "got XXX" where XXX is a quoted representation of the most recent token.
|
||||
func (in *Input) expectText(args ...interface{}) {
|
||||
func (in *Input) expectText(args ...any) {
|
||||
in.Error(append(args, "; got", strconv.Quote(in.Stack.Text()))...)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue