minor runtime fixes
This commit is contained in:
parent
ee922a3da6
commit
be788415ad
@ -155,7 +155,7 @@ func (r *runtime) Create(s *Service, opts ...CreateOption) error {
|
||||
defer r.Unlock()
|
||||
|
||||
if _, ok := r.services[s.Name]; ok {
|
||||
return errors.New("service already registered")
|
||||
return errors.New("service already running")
|
||||
}
|
||||
|
||||
var options CreateOptions
|
||||
|
@ -54,6 +54,13 @@ type ReadOptions struct {
|
||||
Type string
|
||||
}
|
||||
|
||||
// CreateType sets the type of service to create
|
||||
func CreateType(t string) CreateOption {
|
||||
return func(o *CreateOptions) {
|
||||
o.Type = t
|
||||
}
|
||||
}
|
||||
|
||||
// WithCommand specifies the command to execute
|
||||
func WithCommand(args ...string) CreateOption {
|
||||
return func(o *CreateOptions) {
|
||||
|
Loading…
Reference in New Issue
Block a user