diff options
| author | Jeff Carr <[email protected]> | 2025-10-14 04:40:20 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-14 04:51:00 -0500 |
| commit | 7131654e4c40604b20100faf9d55803c7ffe190e (patch) | |
| tree | 36665e73c71c822db5026e841f29472ccf748a73 /parseDpkgOutputIntoPB.go | |
| parent | 41ca39e30bc0f145a01efb08af6e6f8a7a796e61 (diff) | |
TrimRight() is your friend
Diffstat (limited to 'parseDpkgOutputIntoPB.go')
| -rw-r--r-- | parseDpkgOutputIntoPB.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/parseDpkgOutputIntoPB.go b/parseDpkgOutputIntoPB.go index 0aef541..4567efe 100644 --- a/parseDpkgOutputIntoPB.go +++ b/parseDpkgOutputIntoPB.go @@ -66,7 +66,7 @@ func ParseDpkgOutputIntoPB(pb *zoopb.Package, all string) { } } } - varname := strings.TrimSuffix(parts[0], ":") + varname := strings.TrimRight(parts[0], ":") varval := strings.Join(parts[1:], " ") if config.Verbose() { log.Printf("varname:%s varval:%s\n", varname, varval) @@ -154,8 +154,9 @@ func ParseDpkgOutputIntoPB(pb *zoopb.Package, all string) { default: // This forces me(it could be you!) to fix this parser varname2 := strings.TrimSuffix(varname, ":") + log.Println("LINE:", line) log.Printf("UNKNOWN: varname:%s varval:%s varname2=%s\n", varname, varval, varname2) - panic("fix mirrors populateDebInfo()") + panic("fix go.wit.com/lib/debian/parseDpkgOutputIntoPB.go") } } } |
