From 4a64e3a7c292c4976eaa80891ccaff09a62e8dc2 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 3 Dec 2024 22:36:06 -0600 Subject: [PATCH] fix logic --- goDep.parseGoSum.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/goDep.parseGoSum.go b/goDep.parseGoSum.go index 69e4826..5bf3f29 100644 --- a/goDep.parseGoSum.go +++ b/goDep.parseGoSum.go @@ -17,13 +17,20 @@ import ( func (repo *Repo) ParseGoSum() (bool, error) { // empty out what was there before repo.GoDeps = nil + + // check of the repo is a primative + // that means, there is not a go.sum file + // because the package is completely self contained! + if ok, _ := repo.IsPrimitive(); ok { + log.Info("This repo is primative!") + return true, nil + } tmp := filepath.Join(repo.FullPath, "go.sum") gosum, err := os.Open(tmp) + defer gosum.Close() if err != nil { - log.Warn("missing go.sum", repo.FullPath) return false, err } - defer gosum.Close() scanner := bufio.NewScanner(gosum) log.Info("gosum:", tmp)