summaryrefslogtreecommitdiff
path: root/update.go
blob: f1f1af3a5904a46686737b217bbfca50f07cd938 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
package forgepb

func (all *Repos) UpdateGoPath(name string, gopath string) bool {
	oldr := all.DeleteByName(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)
}