Commit 9f81a68d authored by Brendan Melville's avatar Brendan Melville

Adding validation when parsing registry.

parent cf1dd103
...@@ -54,6 +54,10 @@ var usage = func() { ...@@ -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])
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment