diff options
Diffstat (limited to 'finalGoDepsCheckOk.go')
| -rw-r--r-- | finalGoDepsCheckOk.go | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/finalGoDepsCheckOk.go b/finalGoDepsCheckOk.go new file mode 100644 index 0000000..f492a32 --- /dev/null +++ b/finalGoDepsCheckOk.go @@ -0,0 +1,37 @@ +package main + +import ( + "errors" + "fmt" + "path/filepath" + + "go.wit.com/lib/env" + "go.wit.com/lib/protobuf/gitpb" +) + +func finalGoDepsCheckOk(check *gitpb.Repo) error { + err := me.forge.FinalGoDepsCheckOk(check) + if err == nil { + // log.Info("FINDNEXT: forge.FinalGoDepsCheck(check) worked!") + return nil + } + // log.Printf("FINDNEXT: forge.FinalGoDepsCheck(check) err (%v)\n", err) + return err +} + +func testGoDepsCheckOk(godeps *gitpb.GoDeps) error { + if godeps == nil { + return errors.New("testGoDepsCheckOk() godeps == nil") + } + all := godeps.SortByGoPath() + for all.Scan() { + depRepo := all.Next() + fullpath := filepath.Join(env.Get("gopath"), depRepo.GoPath) + found := me.forge.Repos.FindByFullPath(fullpath) + if found == nil { + continue + } + return fmt.Errorf("testGoDepsCheckOk() dep is being upgraded %s", depRepo.GoPath) + } + return nil +} |
