sort packages

This commit is contained in:
Daylin Morgan 2024-07-08 06:53:21 -05:00
parent b32584b4dd
commit ec68314102
Signed by: daylin
GPG key ID: 950D13E9719334AD

View file

@ -3,6 +3,7 @@ package oizys
import ( import (
"fmt" "fmt"
"os" "os"
"sort"
"strings" "strings"
"github.com/charmbracelet/lipgloss" "github.com/charmbracelet/lipgloss"
@ -46,6 +47,7 @@ func parsePackages(lines []string, desc string) *packages {
} }
names[i] = name names[i] = name
} }
sort.Strings(names)
return &packages{names: names, pad: maxLen + 1, desc: desc} return &packages{names: names, pad: maxLen + 1, desc: desc}
} }