backend_utils.go 330 B

12345678910111213141516171819
  1. package plugins
  2. import (
  3. "fmt"
  4. "runtime"
  5. "strings"
  6. )
  7. func ComposePluginStartCommmand(executable string) string {
  8. os := strings.ToLower(runtime.GOOS)
  9. arch := runtime.GOARCH
  10. extension := ""
  11. if os == "windows" {
  12. extension = ".exe"
  13. }
  14. return fmt.Sprintf("%s_%s_%s%s", executable, os, strings.ToLower(arch), extension)
  15. }