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
|
||||
|
||||
go:
|
||||
- 1.10.x
|
||||
- 1.11.x
|
||||
- 1.12.x
|
||||
- tip
|
||||
|
||||
|
@ -44,9 +44,8 @@ func (e *CSV) Export(exports chan interface{}) {
|
||||
values = append(values, fmt.Sprint(val.Index(i)))
|
||||
}
|
||||
case reflect.Map:
|
||||
iter := val.MapRange()
|
||||
for iter.Next() {
|
||||
values = append(values, fmt.Sprint(iter.Value()))
|
||||
for _, key := range val.MapKeys() {
|
||||
values = append(values, fmt.Sprint(val.MapIndex(key)))
|
||||
}
|
||||
sort.Strings(values)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user