diff options
| author | Jeff Carr <[email protected]> | 2025-09-11 22:21:13 -0500 | 
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-09-11 22:21:13 -0500 | 
| commit | 67df8f90f94dfe6744df259c9ad19929cee2434a (patch) | |
| tree | 0464daf6134a738d12ccfc492eb05deef1f2952c | |
| parent | bb1df079102c3cedff682b70bc022cb310b1bed0 (diff) | |
rm GoSrc()v0.7.88
| -rw-r--r-- | clone.go | 14 | ||||
| -rw-r--r-- | main.go | 2 | ||||
| -rw-r--r-- | work.go | 6 | 
3 files changed, 11 insertions, 11 deletions
@@ -68,7 +68,7 @@ func clone(gopath string) (*gitpb.Repo, error) {  	gopath = CleanRepoURL(gopath)  	os.Setenv("REPO_AUTO_CLONE", "true")  	// pb, _ := forge.NewGoPath(gopath) -	check := forge.FindAnyPath(filepath.Join(forge.GetGoSrc(), gopath)) +	check := forge.FindAnyPath(filepath.Join(forge.Config.ReposDir, gopath))  	if check != nil {  		if check.IsValidDir() {  			// repo already exists and is valid @@ -103,8 +103,8 @@ func recursiveClone(check *gitpb.Repo) error {  	if check == nil {  		return errors.New("repo was nil")  	} -	log.Info("STARTING RECURSIVE CLONE", check.GetGoPath()) -	log.Info("STARTING RECURSIVE CLONE", check.GetGoPath()) +	log.Info("STARTING RECURSIVE CLONE", check.Namespace) +	log.Info("STARTING RECURSIVE CLONE", check.Namespace)  	// if just cloned, parse the go.sum file for deps  	if check.ParseGoSum() {  	} else { @@ -114,17 +114,17 @@ func recursiveClone(check *gitpb.Repo) error {  	check.Reload()  	if check.GoDeps == nil { -		log.Info("repo godeps == nil", check.GetGoPath()) +		log.Info("repo godeps == nil", check.Namespace)  		return errors.New("no go deps?")  	}  	// probably this should never be 0 because GoPrimitive should have been true otherwise  	if check.GoDeps.Len() == 0 { -		log.Info("repo len(godeps) == 0", check.GetGoPath()) +		log.Info("repo len(godeps) == 0", check.Namespace)  		return errors.New("go.sum never parsed?")  	} -	log.Info("deps for", check.GetGoPath(), "len()", check.GoDeps.Len()) +	log.Info("deps for", check.Namespace, "len()", check.GoDeps.Len())  	deps := check.GoDeps.SortByGoPath()  	for deps.Scan() {  		depRepo := deps.Next() @@ -179,7 +179,7 @@ func makeValidGoSum(check *gitpb.Repo) error {  	// if this fails, just use go mod  	if err := check.ValidGoSum(); err != nil { -		cmd := []string{"go", "mod", "init", check.GetGoPath()} +		cmd := []string{"go", "mod", "init", check.Namespace}  		log.Info("try running", cmd)  		if _, err := check.RunQuiet(cmd); err != nil {  			log.Info("go mod init failed", err) @@ -86,6 +86,6 @@ func okExit(thing string) {  func badExit(err error) {  	log.Info("Total repositories:", forge.Repos.Len()) -	log.Info("Finished go-clone with error", err, forge.GetGoSrc()) +	log.Info("Finished go-clone with error", err, forge.Config.ReposDir)  	os.Exit(-1)  } @@ -10,10 +10,10 @@ func autoWork() {  	if !argv.AutoWork {  		return  	} -	log.Info("About to re-create", forge.GetGoSrc()+"/go.work") -	shell.PathRun(forge.GetGoSrc(), []string{"mv", "go.work", "go.work.last"}) +	log.Info("About to re-create", forge.Config.ReposDir+"/go.work") +	shell.PathRun(forge.Config.ReposDir, []string{"mv", "go.work", "go.work.last"})  	forge.MakeGoWork() -	shell.PathRun(forge.GetGoSrc(), []string{"go", "work", "use"}) +	shell.PathRun(forge.Config.ReposDir, []string{"go", "work", "use"})  	log.Info("")  	log.Info("original go.work file saved as go.work.last")  	log.Info("")  | 
