mirror of
https://github.com/golang/go
synced 2024-10-03 06:31:22 -06:00
go/printer: use new reflect interface (CL 31107)
R=gri DELTA=2 (0 added, 0 deleted, 2 changed) OCL=31115 CL=31285
This commit is contained in:
parent
b9b32cab58
commit
65dbe76532
@ -152,8 +152,8 @@ func (p *printer) adjustSpacingAndMergeComments() {
|
||||
|
||||
|
||||
func (p *printer) print(args ...) {
|
||||
v := reflect.NewValue(args).(reflect.StructValue);
|
||||
for i := 0; i < v.Len(); i++ {
|
||||
v := reflect.NewValue(args).(*reflect.StructValue);
|
||||
for i := 0; i < v.NumField(); i++ {
|
||||
p.adjustSpacingAndMergeComments();
|
||||
f := v.Field(i);
|
||||
switch x := f.Interface().(type) {
|
||||
|
Loading…
Reference in New Issue
Block a user