summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--human.go3
-rw-r--r--init.go1
-rw-r--r--repoClone.go2
-rw-r--r--repoNew.go9
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)