func GetGrafanaPluginDir(currentOS string) string { //currentOS := runtime.GOOS if currentOS == "windows" { return returnOsDefault(currentOS) } pwd, err := os.Getwd() if err != nil { logger.Error("Could not get current path. using default") return returnOsDefault(currentOS) } if isDevenvironment(pwd) { return "../data/plugins" } return returnOsDefault(currentOS) }
func getGrafanaPluginDir() string { currentOS := runtime.GOOS defaultNix := "/var/lib/grafana/plugins" if currentOS == "windows" { return "../data/plugins" } pwd, err := os.Getwd() if err != nil { logger.Error("Could not get current path. using default") return defaultNix } if isDevenvironment(pwd) { return "../data/plugins" } return defaultNix }