mirror of
https://github.com/MichaelMure/git-bug.git
synced 2024-12-15 10:12:06 +03:00
647b05eee4
also adds: - listlocalidentities - refactors refstoids into entity package
19 lines
271 B
Go
19 lines
271 B
Go
package entity
|
|
|
|
import "strings"
|
|
|
|
func RefsToIds(refs []string) []Id {
|
|
ids := make([]Id, len(refs))
|
|
|
|
for i, ref := range refs {
|
|
ids[i] = refToId(ref)
|
|
}
|
|
|
|
return ids
|
|
}
|
|
|
|
func refToId(ref string) Id {
|
|
split := strings.Split(ref, "/")
|
|
return Id(split[len(split)-1])
|
|
}
|