Adding validation when parsing registry.

pull/24/head
Brendan Melville 9 years ago
parent cf1dd10362
commit 9f81a68dbe

@ -54,6 +54,10 @@ var usage = func() {
func getGitRegistry() *registry.GithubRegistry { func getGitRegistry() *registry.GithubRegistry {
s := strings.Split(*type_registry, "/") s := strings.Split(*type_registry, "/")
if len(s) != 2 {
log.Fatalf("invalid type reegistry: %s", type_registry)
}
return registry.NewGithubRegistry(s[0], s[1]) return registry.NewGithubRegistry(s[0], s[1])
} }

Loading…
Cancel
Save