Go 1.10 and 1.11 support added by using different methods on reflect package.
This commit is contained in:
parent
df37629d4d
commit
762854e511
@ -1,6 +1,8 @@
|
|||||||
language: go
|
language: go
|
||||||
|
|
||||||
go:
|
go:
|
||||||
|
- 1.10.x
|
||||||
|
- 1.11.x
|
||||||
- 1.12.x
|
- 1.12.x
|
||||||
- tip
|
- tip
|
||||||
|
|
||||||
|
@ -44,9 +44,8 @@ func (e *CSV) Export(exports chan interface{}) {
|
|||||||
values = append(values, fmt.Sprint(val.Index(i)))
|
values = append(values, fmt.Sprint(val.Index(i)))
|
||||||
}
|
}
|
||||||
case reflect.Map:
|
case reflect.Map:
|
||||||
iter := val.MapRange()
|
for _, key := range val.MapKeys() {
|
||||||
for iter.Next() {
|
values = append(values, fmt.Sprint(val.MapIndex(key)))
|
||||||
values = append(values, fmt.Sprint(iter.Value()))
|
|
||||||
}
|
}
|
||||||
sort.Strings(values)
|
sort.Strings(values)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user