blob: 6cba24613a2050b0158808415efdab319aaa7872 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
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.GoInfo.GoDeps == nil {
return 0
}
return len(repo.GoInfo.GoDeps.GoDeps)
}
|