1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-08-10 21:52:01 +02:00

Service.Exec is a slice of strings (#960)

This commit is contained in:
Milos Gajdos
2019-11-19 19:36:29 +00:00
committed by Asim Aslam
parent 64d5a528ca
commit d6e97c5970
7 changed files with 58 additions and 167 deletions

View File

@@ -2,7 +2,6 @@ package runtime
import (
"io"
"strings"
"sync"
"github.com/micro/go-micro/runtime/build"
@@ -37,12 +36,13 @@ func newService(s *Service, c CreateOptions) *service {
var args []string
if len(s.Exec) > 0 {
parts := strings.Split(s.Exec, " ")
exec = parts[0]
if len(s.Exec) > 0 {
exec = s.Exec[0]
}
args = []string{}
if len(parts) > 1 {
args = parts[1:]
if len(s.Exec) > 1 {
args = s.Exec[1:]
}
} else {
// set command