fix(api): case insensitive sort for datasources

The data source list is case sensitive when sorted. This changes the
sort to be case insensitive. The test only tests the handler, not the
routing or database query.
This commit is contained in:
Daniel Lee
2017-02-07 22:15:52 +01:00
parent 5e9653f935
commit cbd1455c42
2 changed files with 125 additions and 1 deletions
+1 -1
View File
@@ -91,7 +91,7 @@ func (slice DataSourceList) Len() int {
}
func (slice DataSourceList) Less(i, j int) bool {
return slice[i].Name < slice[j].Name
return strings.ToLower(slice[i].Name) < strings.ToLower(slice[j].Name)
}
func (slice DataSourceList) Swap(i, j int) {