diff options
| author | Jeff Carr <[email protected]> | 2025-10-09 06:23:08 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-09 06:44:11 -0500 |
| commit | bab0ecf924c0f4ddbac5b86ba226a742828c8b40 (patch) | |
| tree | e54fef46d48187a4bdae71469caf651320b5fc62 | |
| parent | e8ee27ea75b4df4f91d00c6c2741bd446694e464 (diff) | |
fixes to the .proto filev0.0.6
| -rw-r--r-- | apt.go | 4 | ||||
| -rw-r--r-- | populatePackagePB.go | 2 | ||||
| -rw-r--r-- | update.go | 4 | ||||
| -rw-r--r-- | wit.go | 8 |
4 files changed, 9 insertions, 9 deletions
@@ -73,10 +73,10 @@ func initPackages(me *zoopb.Machine) { // Print the installed packages and their versions for pkg, version := range newP { new1 := new(zoopb.Package) - new1.Name = pkg + new1.Package = pkg new1.Version = version me.Packages.Append(new1) - // log.Info("added", new1.Name, "failed") + // log.Info("added", new1.Package, "failed") } getMemory(me) diff --git a/populatePackagePB.go b/populatePackagePB.go index 1d9b900..ad39069 100644 --- a/populatePackagePB.go +++ b/populatePackagePB.go @@ -7,7 +7,7 @@ import ( "go.wit.com/lib/config" ) -func setString(pb proto.Message, varname string, varvalue string) (bool, error) { +func SetString(pb proto.Message, varname string, varvalue string) (bool, error) { msg := pb.ProtoReflect() // This is the entry point to the reflection API. descriptor := msg.Descriptor() // Get the message's descriptor, which contains metadata about its fields. @@ -89,11 +89,11 @@ func UpdatePackages(me *zoopb.Machine) error { // Print the installed packages and their versions for pname, version := range newP { - found := me.Packages.FindByName(pname) + found := me.Packages.FindByPackage(pname) if found == nil { log.Info("adding new", pname, version) new1 := new(zoopb.Package) - new1.Name = pname + new1.Package = pname new1.Version = version me.Packages.Append(new1) } else { @@ -21,7 +21,7 @@ func InitWitMirrors(m *zoopb.Machine) error { // adds the package if the name isn't there // if it's newer, remove the old package and use the new one func AddIfNewer(all *zoopb.Packages, p *zoopb.Package) { - check := all.FindByName(p.Name) + check := all.FindByPackage(p.Package) if check == nil { all.Append(p) return @@ -62,7 +62,7 @@ func fillPB(p *zoopb.Package, namemap map[string]string) error { if varname == "Git-Tag-Date" { varname = "GitTagDate" } - if ok, err := setString(p, varname, s); ok { + if ok, err := SetString(p, varname, s); ok { continue } else { log.Printf("%s: var=%s val=%s err=%v\n", p.Package, varname, s, err) @@ -167,9 +167,9 @@ func parsePackageInfo(lines string) (*zoopb.Package, map[string]string) { } p := zoopb.Package{ - Name: name, + Package: name, Version: version, - PkgName: filename, + Filename: filename, Namespace: gopath, } |
