diff options
| author | Jeff Carr <[email protected]> | 2025-10-24 18:31:43 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-24 18:31:43 -0500 |
| commit | 8a42142f30cd186b57b94fb6c012af5315b0dfd1 (patch) | |
| tree | 75c28ee5a4a050e3efa80e125d5f80d93216ea42 /parseDpkgOutputIntoPB.go | |
| parent | d776ba4792acd16bd88aaba6ac2920ad1911b4d7 (diff) | |
s/ENV/env/ but ENV really is better herev0.0.19
Diffstat (limited to 'parseDpkgOutputIntoPB.go')
| -rw-r--r-- | parseDpkgOutputIntoPB.go | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/parseDpkgOutputIntoPB.go b/parseDpkgOutputIntoPB.go index 168fb22..7b164e3 100644 --- a/parseDpkgOutputIntoPB.go +++ b/parseDpkgOutputIntoPB.go @@ -10,8 +10,8 @@ import ( "os" "strings" - "go.wit.com/lib/ENV" "go.wit.com/lib/cobol" + "go.wit.com/lib/env" "go.wit.com/lib/gui/shell" "go.wit.com/lib/protobuf/zoopb" "go.wit.com/log" @@ -88,14 +88,14 @@ func ParseDpkgOutputIntoPB(pb *zoopb.Package, all string) { } if starting { if parts[0] == "new" { - if ENV.Verbose() { + if env.Verbose() { log.Printf("new: %v\n", parts) } // skip the first dpkg -I line continue } if parts[0] == "size" { - if ENV.Verbose() { + if env.Verbose() { log.Printf("size: %v\n", parts) } // todo: make this correct @@ -106,7 +106,7 @@ func ParseDpkgOutputIntoPB(pb *zoopb.Package, all string) { line = scanner.Text() parts = strings.Fields(line) if strings.HasPrefix(line, " ") { - if ENV.Verbose() { + if env.Verbose() { log.Printf("sizeline: %v\n", parts) } continue @@ -116,7 +116,7 @@ func ParseDpkgOutputIntoPB(pb *zoopb.Package, all string) { } } if starting { - if ENV.Verbose() { + if env.Verbose() { log.Printf("probably real data: %v\n", parts) } if strings.HasSuffix(parts[0], ":") { @@ -129,7 +129,7 @@ func ParseDpkgOutputIntoPB(pb *zoopb.Package, all string) { } varname := strings.TrimRight(parts[0], ":") varval := strings.Join(parts[1:], " ") - if ENV.Verbose() { + if env.Verbose() { log.Printf("varname:%s varval:%s\n", varname, varval) } switch varname { @@ -184,7 +184,7 @@ func ParseDpkgOutputIntoPB(pb *zoopb.Package, all string) { t, err := cobol.GetTime(varval) if t != nil { pb.GitDate = timestamppb.New(*t) - } else if ENV.Verbose() { + } else if env.Verbose() { log.Info("FIXME: Package-Build-Date", varval, err) } case "Deb-File-Date": @@ -192,7 +192,7 @@ func ParseDpkgOutputIntoPB(pb *zoopb.Package, all string) { t, err := cobol.GetTime(varval) if t != nil { pb.GitDate = timestamppb.New(*t) - } else if ENV.Verbose() { + } else if env.Verbose() { log.Info("FIXME: Package-Build-Date", varval, err) } case "Build-Date": @@ -200,18 +200,18 @@ func ParseDpkgOutputIntoPB(pb *zoopb.Package, all string) { t, err := cobol.GetTime(varval) if t != nil { pb.BuildDate = timestamppb.New(*t) - } else if ENV.Verbose() { + } else if env.Verbose() { log.Info("FIXME: Package-Build-Date", varval, err) } case "Package-Build-Date": t, err := cobol.GetTime(varval) if t != nil { pb.BuildDate = timestamppb.New(*t) - } else if ENV.Verbose() { + } else if env.Verbose() { log.Info("FIXME: Package-Build-Date", varval, err) } case "Git-Tag-Date": - if ENV.Verbose() { + if env.Verbose() { log.Info("FIXME: Git-Tag-Date", varval) } case "Description": |
