grafana/pkg/plugins/backend_utils.go
Will Browne da98ebdcdf
Plugins: Remove old code related to Core plugin installs (#44311)
* remove old code

* remove even more

* skip flaky test
2022-01-21 13:38:04 +01:00

32 lines
590 B
Go

package plugins
import (
"fmt"
"runtime"
"strings"
)
func ComposePluginStartCommand(executable string) string {
os := strings.ToLower(runtime.GOOS)
arch := runtime.GOARCH
extension := ""
if os == "windows" {
extension = ".exe"
}
return fmt.Sprintf("%s_%s_%s%s", executable, os, strings.ToLower(arch), extension)
}
func ComposeRendererStartCommand() string {
os := strings.ToLower(runtime.GOOS)
arch := runtime.GOARCH
extension := ""
if os == "windows" {
extension = ".exe"
}
return fmt.Sprintf("%s_%s_%s%s", "plugin_start", os, strings.ToLower(arch), extension)
}