forgepb/update.go

14 lines
273 B
Go
Raw Normal View History

2024-11-20 13:56:27 -06:00
package forgepb
func (all *Repos) UpdateGoPath(name string, gopath string) bool {
2024-11-20 21:22:05 -06:00
oldr := all.DeleteByPath(name)
if oldr == nil {
// nothing to update
return false
}
2024-11-20 13:56:27 -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
}