Browse Source

Fix group strings (with umlauts...)

master
Jan-Lukas Else 1 week ago
parent
commit
55902a2de9
2 changed files with 3 additions and 2 deletions
  1. +2
    -1
      main.go
  2. +1
    -1
      utils.go

+ 2
- 1
main.go View File

@ -4,6 +4,7 @@ import (
"log"
"os"
"os/signal"
"syscall"
jsoniter "github.com/json-iterator/go"
)
@ -90,7 +91,7 @@ func main() {
}()
// Graceful shutdown
signal.Notify(quit, os.Interrupt)
signal.Notify(quit, os.Interrupt, syscall.SIGINT, syscall.SIGTERM)
<-quit
log.Println("Stopping...")


+ 1
- 1
utils.go View File

@ -125,7 +125,7 @@ type stringGroup struct {
func groupStrings(toGroup []string) []stringGroup {
stringMap := map[string][]string{}
for _, s := range toGroup {
first := strings.ToUpper(s[:1])
first := strings.ToUpper(strings.Split(s, "")[0])
stringMap[first] = append(stringMap[first], s)
}
stringGroups := []stringGroup{}


Loading…
Cancel
Save