attempting to clean go.* handling again

This commit is contained in:
Jeff Carr 2024-12-18 20:08:14 -06:00
parent d473f80919
commit 163484be1f
1 changed files with 0 additions and 20 deletions

View File

@ -105,17 +105,6 @@ func recursiveClone(check *gitpb.Repo) error {
}
func makeValidGoSum(check *gitpb.Repo) error {
if check.Exists("go.mod") {
log.Info("makeValidGoSum() attempt SetPrimitive()")
if err := check.SetPrimitive(); err != nil {
log.Info("SetPrimitive() failed", err)
return err
}
}
if check.GoInfo.GoPrimitive {
log.Info(check.GetGoPath(), "is a golang primitive! no need to parse go.sum because there is not one!")
return nil
}
// attempt to grab the notes
check.Run([]string{"git", "fetch", "origin", "refs/notes/*:refs/notes/*"})
@ -137,15 +126,6 @@ func makeValidGoSum(check *gitpb.Repo) error {
if err := check.RunStrict(cmd); err != nil {
log.Info("go mod init failed", err)
}
if check.Exists("go.mod") {
if err := check.SetPrimitive(); err != nil {
return err
}
}
if check.GoInfo.GoPrimitive {
log.Info(check.GetGoPath(), "is a golang primitive! no need to parse go.sum because there is not one!")
return nil
}
if err := check.RunStrict([]string{"go", "mod", "tidy"}); err != nil {
log.Info("go mod tidy failed", err)
}