19 lines
393 B
Go
19 lines
393 B
Go
package gitpb
|
|
|
|
// this is becoming a standard format
|
|
// todo: autogenerate this from the .proto file?
|
|
|
|
func (all *Repos) DeleteByPath(gopath string) *Repo {
|
|
repolock.Lock()
|
|
defer repolock.Unlock()
|
|
|
|
for i, _ := range all.Repos {
|
|
if all.Repos[i].GoPath == gopath {
|
|
all.Repos[i] = all.Repos[len(all.Repos)-1]
|
|
all.Repos = all.Repos[:len(all.Repos)-1]
|
|
return nil
|
|
}
|
|
}
|
|
return nil
|
|
}
|