gitpb/goDep.redoGoMod.go

28 lines
509 B
Go

package gitpb
import (
"fmt"
"go.wit.com/log"
)
// does processing on the go.mod and go.sum files
// 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 {
if repo.ParseGoSum() {
return nil
}
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)
}