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

Support service types in runtime

This commit is contained in:
Asim Aslam
2019-11-29 11:35:00 +00:00
parent 114bc1e18b
commit c3ed83dfba
12 changed files with 171 additions and 164 deletions

View File

@@ -37,22 +37,11 @@ func newService(s *Service, c CreateOptions) *service {
var exec string
var args []string
if len(s.Exec) > 0 {
if len(s.Exec) > 0 {
exec = s.Exec[0]
}
args = []string{}
if len(s.Exec) > 1 {
args = s.Exec[1:]
}
} else {
// set command
exec = c.Command[0]
// set args
if len(c.Command) > 1 {
args = c.Command[1:]
}
// set command
exec = c.Command[0]
// set args
if len(c.Command) > 1 {
args = c.Command[1:]
}
return &service{