Go 1.10 and 1.11 support added by using different methods on reflect package.

This commit is contained in:
Musab Gültekin committed 2019-07-21 12:08:41 +03:00
1 parent df37629d4d
commit 762854e511
2 files changed
+4 -3

No files matched your search

+2
View File
@@ -1,6 +1,8 @@
language: go
go:
- 1.10.x
- 1.11.x
- 1.12.x
- tip
+2 -3
View File
@@ -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)
}