import (
"go/token"
"regexp"
+ "sort"
"strings"
"unicode"
"unicode/utf8"
}
list = append(list, flist...)
}
+ sort.Sort(exampleByName(list))
return list
}
rune, _ := utf8.DecodeRuneInString(name[len(prefix):])
return !unicode.IsLower(rune)
}
+
+type exampleByName []*Example
+
+func (s exampleByName) Len() int { return len(s) }
+func (s exampleByName) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
+func (s exampleByName) Less(i, j int) bool { return s[i].Name < s[j].Name }