todo: make go.* files git metadata
This commit is contained in:
parent
934daa5a3b
commit
e9776796dd
|
@ -22,27 +22,14 @@ func (f *Forge) FinalGoDepsCheckOk(check *gitpb.Repo) bool {
|
||||||
log.Info("boo, check == nil")
|
log.Info("boo, check == nil")
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if !check.Exists("go.mod") {
|
|
||||||
log.Info("go.mod is missing in", check.GetGoPath())
|
// parse the go.mod and go.sum files
|
||||||
|
if !check.ParseGoSum() {
|
||||||
|
log.Info("forge.FinalGoDepsCheckOk() failed")
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsPrimitive() is expected to set GoPrimitive = true in the protobuf
|
if check.GetGoPrimitive() {
|
||||||
if err := check.SetPrimitive(); err == nil {
|
|
||||||
log.Info("gitpb.SetPrimitive() returned true for", check.GetGoPath())
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
// clear out the protobuf and rescan from the file
|
|
||||||
check.GoDeps = nil
|
|
||||||
if ok, err := check.ParseGoSum(); !ok {
|
|
||||||
log.Info("forge.FinalGoDepsCheckOk() error", err)
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
if check.GoDepsLen() == 0 {
|
|
||||||
// this is a primitive
|
|
||||||
check.GoInfo.GoPrimitive = true
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue