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

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

View File

@ -1,6 +1,8 @@
language: go
go:
- 1.10.x
- 1.11.x
- 1.12.x
- tip

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)
}