Commit 14df3c62 by bergquist

feat(cli): use built in envvar support

parent 7f8643ef
......@@ -12,10 +12,6 @@ import (
var version = "master"
func getGrafanaPluginPath() string {
if os.Getenv("GF_PLUGIN_DIR") != "" {
return os.Getenv("GF_PLUGIN_DIR")
}
os := runtime.GOOS
if os == "windows" {
return "C:\\opt\\grafana\\plugins"
......@@ -37,11 +33,13 @@ func main() {
Name: "path",
Usage: "path to the grafana installation",
Value: getGrafanaPluginPath(),
EnvVar: "GF_PLUGIN_DIR",
},
cli.StringFlag{
Name: "repo",
Usage: "url to the plugin repository",
Value: "https://grafana-net.raintank.io/api/plugins",
EnvVar: "GF_PLUGIN_REPO",
},
cli.BoolFlag{
Name: "debug, d",
......
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