gitpb/goDep.redoGoMod.go

28 lines
509 B
Go
Raw Permalink Normal View History

package gitpb
import (
2024-12-18 23:06:27 -06:00
"fmt"
"go.wit.com/log"
)
2024-12-18 23:06:27 -06:00
// does processing on the go.mod and go.sum files
2024-12-15 12:14:48 -06:00
// checks to see if the go.sum and go.mod files exist
// also check for a match with the repo.pb GoPrimitive bool
// todo: check mtime
func (repo *Repo) ValidGoSum() error {
2024-12-18 23:06:27 -06:00
if repo.ParseGoSum() {
2024-12-15 12:14:48 -06:00
return nil
}
2024-12-18 23:06:27 -06:00
log.Info("ValidGoSum() deprecated")
return fmt.Errorf("ParseGoSum() failed")
}
func (repo *Repo) GoDepsLen() int {
if repo.GoDeps == nil {
return 0
}
return len(repo.GoDeps.GoDeps)
}