diff --git a/utility/sort/sort.go b/utility/sort/sort.go index 20541344..cbc5cb97 100644 --- a/utility/sort/sort.go +++ b/utility/sort/sort.go @@ -7,9 +7,6 @@ import ( func Procs(procList []metadata.Metadata) { sort.Slice(procList, func(i, j int) bool { - if procList[i].Name < procList[j].Name { - return true - } - return false + return procList[i].Name < procList[j].Name }) } diff --git a/utility/sort/sort_test.go b/utility/sort/sort_test.go index 9fa83ed1..481fc597 100644 --- a/utility/sort/sort_test.go +++ b/utility/sort/sort_test.go @@ -7,15 +7,9 @@ import ( ) func TestSorting(t *testing.T) { - procOne := metadata.Metadata{ - Name: "one"} - - procTwo := metadata.Metadata{ - Name: "two"} - - procThree := metadata.Metadata{ - Name: "three"} - + procOne := metadata.Metadata{Name: "one"} + procTwo := metadata.Metadata{Name: "two"} + procThree := metadata.Metadata{Name: "three"} procList := []metadata.Metadata{procThree, procTwo, procOne} expectedProcList := []metadata.Metadata{procOne, procThree, procTwo}