From be026e8edc5a9cac0d8923cc00099c150f97e329 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 1 Dec 2024 22:36:36 -0600 Subject: [PATCH] remove all the old testing things() --- human.go | 3 +-- init.go | 1 - repoClone.go | 2 +- repoNew.go | 9 ++++----- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/human.go b/human.go index 67b7952..dcf2289 100644 --- a/human.go +++ b/human.go @@ -37,8 +37,7 @@ func (f *Forge) standardHeader(r *ForgeConfig) string { // print a human readable table to STDOUT func (f *Forge) ConfigPrintTable() { if f == nil { - log.Info("WTF forge == nil") - panic("WTF forge == nil") + return } log.Info(standardHeader()) loop := f.Config.SortByGoPath() diff --git a/init.go b/init.go index 1a8384b..5a3f4bf 100644 --- a/init.go +++ b/init.go @@ -18,7 +18,6 @@ func Init() *Forge { goSrcDir, err := f.findGoSrc() if err != nil { log.Warn("forge init() findGoSrc()", err) - panic("forge init() findGoSrc()") } os.Setenv("FORGE_GOSRC", goSrcDir) } diff --git a/repoClone.go b/repoClone.go index 8078d36..75dd393 100644 --- a/repoClone.go +++ b/repoClone.go @@ -220,7 +220,7 @@ func cloneActual(newdir, basedir, giturl string) error { } // git clone didn't really work but did make a directory log.Info("fullpath is probably empty", fullpath) - panic("crapnuts. rmdir fullpath here?") + return errors.New("crapnuts. rmdir fullpath here? " + fullpath) } // check the server for the current go path to git url mapping diff --git a/repoNew.go b/repoNew.go index ad58373..f114487 100644 --- a/repoNew.go +++ b/repoNew.go @@ -4,14 +4,14 @@ import ( "os/user" "go.wit.com/lib/protobuf/gitpb" - "go.wit.com/log" ) +/* func (f *Forge) NewGoPath(gopath string) (*gitpb.Repo, error) { newr, err := f.Repos.NewGoPath(f.goSrc, gopath) if err != nil { log.Log(FORGEPBWARN, "init failed", err) - panic("crapnuts") + return nil, err } log.Info("init worked for", newr.GoPath) // try to guess what the 'master' branch is @@ -41,10 +41,9 @@ func (f *Forge) NewGoPath(gopath string) (*gitpb.Repo, error) { newr.SetUserBranchName(uname + "FIXME") } f.Repos.ConfigSave() - panic("forgepb got here") - - // return newr, err + return newr, err } +*/ func (f *Forge) VerifyBranchNames(newr *gitpb.Repo) { // log.Info("init worked for", newr.GoPath)