mirror of
https://github.com/MichaelMure/git-bug.git
synced 2024-12-15 18:23:08 +03:00
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])
|
||
|
}
|