diff options
| author | Jeff Carr <[email protected]> | 2024-12-18 20:09:03 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-12-18 20:09:03 -0600 |
| commit | e9776796dd3cbaf7b28e0ac0136b194aa049aeb0 (patch) | |
| tree | 5d526cb4fe0cf8becf668359ff43885ff2da2d4a /finalGoSumCheck.go | |
| parent | 934daa5a3b5e936ea384d8fad0659d60b8d313f9 (diff) | |
todo: make go.* files git metadatav0.0.40
Diffstat (limited to 'finalGoSumCheck.go')
| -rw-r--r-- | finalGoSumCheck.go | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/finalGoSumCheck.go b/finalGoSumCheck.go index 0e5d26e..f32f905 100644 --- a/finalGoSumCheck.go +++ b/finalGoSumCheck.go @@ -22,27 +22,14 @@ func (f *Forge) FinalGoDepsCheckOk(check *gitpb.Repo) bool { log.Info("boo, check == nil") return false } - if !check.Exists("go.mod") { - log.Info("go.mod is missing in", check.GetGoPath()) - return false - } - - // IsPrimitive() is expected to set GoPrimitive = true in the protobuf - 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) + // parse the go.mod and go.sum files + if !check.ParseGoSum() { + log.Info("forge.FinalGoDepsCheckOk() failed") return false } - if check.GoDepsLen() == 0 { - // this is a primitive - check.GoInfo.GoPrimitive = true + if check.GetGoPrimitive() { return true } |
