forgepb/update.go

14 lines
273 B
Go

package forgepb
func (all *Repos) UpdateGoPath(name string, gopath string) bool {
oldr := all.DeleteByPath(name)
if oldr == nil {
// nothing to update
return false
}
// update gopath and append it back to the list
oldr.GoPath = gopath
return all.Append(oldr)
}