Addtional sort by
@@ -153,7 +153,7 @@ func fileSummerize(input *chan *FileJob) {
}
// TODO have this configurable through CLI
- sortBy := "count"
+ sortBy := "complexity"
switch {
case sortBy == "name":
@@ -164,6 +164,10 @@ func fileSummerize(input *chan *FileJob) {
sort.Slice(language, func(i, j int) bool {
return language[i].Count > language[j].Count
})
+ case sortBy == "complexity":
+ sort.Slice(language, func(i, j int) bool {
+ return language[i].Complexity > language[j].Complexity
+ })
}
for _, summary := range language {
