summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-24 18:31:43 -0500
committerJeff Carr <[email protected]>2025-10-24 18:31:43 -0500
commit8a42142f30cd186b57b94fb6c012af5315b0dfd1 (patch)
tree75c28ee5a4a050e3efa80e125d5f80d93216ea42
parentd776ba4792acd16bd88aaba6ac2920ad1911b4d7 (diff)
s/ENV/env/ but ENV really is better herev0.0.19
-rw-r--r--getKeyFromPackaagePB.go4
-rw-r--r--parseDpkgOutputIntoPB.go22
2 files changed, 13 insertions, 13 deletions
diff --git a/getKeyFromPackaagePB.go b/getKeyFromPackaagePB.go
index bf935df..68443c3 100644
--- a/getKeyFromPackaagePB.go
+++ b/getKeyFromPackaagePB.go
@@ -3,8 +3,8 @@ package debian
import (
"strings"
- "go.wit.com/lib/ENV"
"go.wit.com/lib/cobol"
+ "go.wit.com/lib/env"
"go.wit.com/lib/protobuf/zoopb"
"go.wit.com/log"
)
@@ -24,7 +24,7 @@ func GetKeyFromPackagePB(p *zoopb.Package, varname string) (string, string) {
return "Maintainer", p.DebInfo.Maintainer
// return "Maintainer", p.Author
case "Source":
- if ENV.Verbose() {
+ if env.Verbose() {
log.Info("skipping from controlfile", varname)
// return "Source", p.DebInfo.Source
}
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":