backend_utils.go 329 Bytes
Newer Older
1 2 3 4 5 6 7 8
package plugins

import (
	"fmt"
	"runtime"
	"strings"
)

9
func ComposePluginStartCommand(executable string) string {
10 11 12 13 14 15 16 17 18 19
	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)
}