irongit

A series of universal tools for go projects.

using splitseq

huncholanehuncholaneauthored
parent c79d154commit 41a3230d66249385e4425ae58c1e18f25c06c91fBrowse files

1 file changed, +1 -1

+1-1querytools/orderby.go
@@ -33,7 +33,7 @@ func (ob *OrderBy) Append(field OrderByField) {
3333
3434 func OrderByFromString(allowed_fields map[string]struct{}, s string) OrderBy {
3535 ob := OrderBy{}
36- for _, raw := range strings.Split(s, ",") {
36+ for raw := range strings.SplitSeq(s, ",") {
3737 dir := "ASC"
3838 if raw[0] == '-' {
3939 raw = raw[1:]