Fix panic on invalid version strings

This commit is contained in:
Peter Dyer 2018-08-05 00:25:27 +01:00
parent 6515a9bf04
commit 8d7ff22fed

4
dep.go
View file

@ -53,6 +53,10 @@ func splitDep(dep string) (string, string, string) {
return match
})
if len(split) == 0 {
return "", "", ""
}
if len(split) == 1 {
return split[0], "", ""
}