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 language: go
go: go:
- 1.10.x
- 1.11.x
- 1.12.x - 1.12.x
- tip - tip

View File

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