tech(cli): lets use the fact that we have a compiler

This commit is contained in:
bergquist
2016-06-26 03:47:15 +02:00
parent 88e208bddf
commit 07be2c89a3
8 changed files with 29 additions and 10 deletions
@@ -16,6 +16,9 @@ type CommandLine interface {
GlobalString(name string) string
FlagNames() (names []string)
Generic(name string) interface{}
PluginDirectory() string
RepoDirectory() string
}
type contextCommandLine struct {
@@ -33,3 +36,11 @@ func (c *contextCommandLine) ShowVersion() {
func (c *contextCommandLine) Application() *cli.App {
return c.App
}
func (c *contextCommandLine) PluginDirectory() string {
return c.GlobalString("pluginsDir")
}
func (c *contextCommandLine) RepoDirectory() string {
return c.GlobalString("repo")
}