tech(cli): lets use the fact that we have a compiler
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user