summaryrefslogtreecommitdiff
path: root/update.go
blob: 8dce1a0cdb2c0afaf6b1c865a537d716c3ce4962 (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.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)
}