mirror of
https://github.com/grafana/grafana.git
synced 2026-08-26 21:37:31 -05:00
20 lines
330 B
Go
20 lines
330 B
Go
package plugins
|
|||
|
|
|
||
|
|
import (
|
||
|
|
"fmt"
|
||
|
|
"runtime"
|
||
|
|
"strings"
|
||
|
|
)
|
||
|
|
|
||
|
|
func ComposePluginStartCommmand(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)
|
||
|
|
}
|