2024-11-20 13:56:27 -06:00
|
|
|
package forgepb
|
|
|
|
|
2024-11-20 15:57:34 -06:00
|
|
|
func (all *Repos) UpdateGoPath(name string, gopath string) bool {
|
2024-11-20 21:22:05 -06:00
|
|
|
oldr := all.DeleteByPath(name)
|
2024-11-20 15:57:34 -06:00
|
|
|
if oldr == nil {
|
|
|
|
// nothing to update
|
|
|
|
return false
|
|
|
|
}
|
2024-11-20 13:56:27 -06:00
|
|
|
|
2024-11-20 15:57:34 -06:00
|
|
|
// update gopath and append it back to the list
|
|
|
|
oldr.GoPath = gopath
|
|
|
|
return all.Append(oldr)
|
2024-11-20 13:56:27 -06:00
|
|
|
}
|