Skip to content

Commit e74e67e

Browse files
committed
chore: gofmt -w -r 'interface{} -> any' .
Excludes Go stdlib forks vim25/{json,xml} , which should be synced separately w/ upstream. Signed-off-by: Doug MacEachern <[email protected]>
1 parent f6bae07 commit e74e67e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+186
-186
lines changed

cli/about/command.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ func (r *infoResult) Write(w io.Writer) error {
105105
return tw.Flush()
106106
}
107107

108-
func (r *infoResult) Dump() interface{} {
108+
func (r *infoResult) Dump() any {
109109
if r.Content != nil {
110110
return r.Content
111111
}

cli/disk/ls.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ func (r *lsResult) Write(w io.Writer) error {
189189
return tw.Flush()
190190
}
191191

192-
func (r *lsResult) Dump() interface{} {
192+
func (r *lsResult) Dump() any {
193193
return r.Objects
194194
}
195195

cli/disk/metadata/ls.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func (r lsResult) Write(w io.Writer) error {
7070
return tw.Flush()
7171
}
7272

73-
func (r lsResult) Dump() interface{} {
73+
func (r lsResult) Dump() any {
7474
return []types.KeyValue(r)
7575
}
7676

cli/disk/snapshot/ls.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func (r *lsResult) Write(w io.Writer) error {
6666
return tw.Flush()
6767
}
6868

69-
func (r *lsResult) Dump() interface{} {
69+
func (r *lsResult) Dump() any {
7070
return r.Info
7171
}
7272

cli/esx/executor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ func (e *Executor) NewRequest(ctx context.Context, args []string) (*internal.Exe
150150
return &sreq, info, nil
151151
}
152152

153-
func (e *Executor) Execute(ctx context.Context, req *internal.ExecuteSoapRequest, res interface{}) error {
153+
func (e *Executor) Execute(ctx context.Context, req *internal.ExecuteSoapRequest, res any) error {
154154
req.This = e.mme.ManagedObjectReference
155155
req.Version = "urn:vim25/5.0"
156156

cli/events/command.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ type record struct {
142142
}
143143

144144
// Dump the raw Event rather than the record struct.
145-
func (r *record) Dump() interface{} {
145+
func (r *record) Dump() any {
146146
return r.event
147147
}
148148

cli/flags/debug.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ func (v *verbose) objectContent(content []types.ObjectContent) []string {
360360
return s
361361
}
362362

363-
func (v *verbose) prettyPrint(val interface{}) string {
363+
func (v *verbose) prettyPrint(val any) string {
364364
p := pretty.Sprintf("%# v\n", val)
365365
var res []string
366366
scanner := bufio.NewScanner(strings.NewReader(p))
@@ -435,7 +435,7 @@ func (v *verbose) RoundTrip(ctx context.Context, req, res soap.HasFault) error {
435435

436436
vres := reflect.ValueOf(res).Elem().FieldByName("Res").Elem()
437437
ret := vres.FieldByName("Returnval")
438-
var s interface{} = "void"
438+
var s any = "void"
439439

440440
if ret.IsValid() {
441441
switch x := ret.Interface().(type) {

cli/flags/int32.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func (i *int32Value) Set(s string) error {
2020
return err
2121
}
2222

23-
func (i *int32Value) Get() interface{} {
23+
func (i *int32Value) Get() any {
2424
return int32(*i)
2525
}
2626

@@ -44,7 +44,7 @@ func (i *int32ptrValue) Set(s string) error {
4444
return err
4545
}
4646

47-
func (i *int32ptrValue) Get() interface{} {
47+
func (i *int32ptrValue) Get() any {
4848
if i.val == nil || *i.val == nil {
4949
return nil
5050
}

cli/flags/int64.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func (i *int64Value) Set(s string) error {
2020
return err
2121
}
2222

23-
func (i *int64Value) Get() interface{} {
23+
func (i *int64Value) Get() any {
2424
return int64(*i)
2525
}
2626

@@ -44,7 +44,7 @@ func (i *int64ptrValue) Set(s string) error {
4444
return err
4545
}
4646

47-
func (i *int64ptrValue) Get() interface{} {
47+
func (i *int64ptrValue) Get() any {
4848
if i.val == nil || *i.val == nil {
4949
return nil
5050
}

cli/flags/optional_bool.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func (b *optionalBool) Set(s string) error {
2020
return err
2121
}
2222

23-
func (b *optionalBool) Get() interface{} {
23+
func (b *optionalBool) Get() any {
2424
if *b.val == nil {
2525
return nil
2626
}

0 commit comments

Comments
 (0)