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 }