From af7f6507885dcad53edbf80d257a4deecb09bf74 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Tue, 27 Mar 2018 00:13:03 +0200 Subject: [PATCH] Ignore case when sorting services --- service-monitor/model.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/service-monitor/model.go b/service-monitor/model.go index 8965663..6cefee7 100644 --- a/service-monitor/model.go +++ b/service-monitor/model.go @@ -3,6 +3,7 @@ package main import ( "fmt" "sort" + "strings" "github.com/coreos/go-systemd/sdjournal" ) @@ -23,7 +24,7 @@ func serviceModel(specialServices, activeOnly bool) ([]ServiceItem, error) { } sort.Slice(ts, func(i, j int) bool { - return ts[i].Name < ts[j].Name + return strings.ToLower(ts[i].Name) < strings.ToLower(ts[j].Name) }) model := []ServiceItem{}