debconf: fix extra spaces, Name column ordering

This commit is contained in:
mappu 2024-06-30 14:14:26 +12:00
parent 053e07c319
commit 1cfc94a42b

View File

@ -33,7 +33,7 @@ func Parse(r io.Reader) (*Database, error) {
knownColumnNames := map[string]struct{}{
"Name": struct{}{},
}
var discoveredColumns []string
var discoveredColumns []string = []string{"Name"}
for sc.Scan() {
linenum++
@ -67,6 +67,8 @@ func Parse(r io.Reader) (*Database, error) {
discoveredColumns = append(discoveredColumns, key)
}
rest = strings.TrimLeft(rest, " \t")
if key == `Name` {
wip.Name = rest
} else {