From 816760d1372d6d1922a9916f3150e49f3fd562cd Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 5 Dec 2024 12:29:47 -0600 Subject: developing on this now --- doDelete.go | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 doDelete.go (limited to 'doDelete.go') diff --git a/doDelete.go b/doDelete.go new file mode 100644 index 0000000..b0ab05e --- /dev/null +++ b/doDelete.go @@ -0,0 +1,41 @@ +package main + +import ( + "go.wit.com/lib/protobuf/gitpb" + "go.wit.com/log" +) + +func Delete(repo *gitpb.Repo, s map[string]string) bool { + if repo.Published == nil { + log.Info("published is nil", repo.Published) + } else { + log.Info("published len", repo.Published.Len()) + } + + // add a new one here + newr := gitpb.Repo{ + FullPath: repo.FullPath, + GoPath: repo.GoPath, + URL: repo.URL, + Tags: repo.Tags, + LastPull: repo.LastPull, + MasterBranchName: repo.MasterBranchName, + DevelBranchName: repo.DevelBranchName, + UserBranchName: repo.UserBranchName, + GoLibrary: repo.GoLibrary, + GoBinary: repo.GoBinary, + GoPrimitive: repo.GoPrimitive, + GoPlugin: repo.GoPlugin, + GoDeps: repo.GoDeps, + LastGoDep: repo.LastGoDep, + Dirty: repo.Dirty, + Published: repo.Published, + TargetVersion: repo.TargetVersion, + ReadOnly: repo.ReadOnly, + GoProtobuf: repo.GoProtobuf, + } + if argv.Fix { + me.forge.Repos.AppendUniqueGoPath(&newr) + } + return true +} -- cgit v1.2.3