service: rename Config.KV to Config.Option.
This commit is contained in:
+2
-2
@@ -130,8 +130,8 @@ type Config struct {
|
|||||||
ChRoot string
|
ChRoot string
|
||||||
UserService bool // Install as a current user service.
|
UserService bool // Install as a current user service.
|
||||||
|
|
||||||
// System specific parameters.
|
// System specific options.
|
||||||
KV KeyValue
|
Option KeyValue
|
||||||
}
|
}
|
||||||
|
|
||||||
var errNameFieldRequired = errors.New("Config.Name field is required.")
|
var errNameFieldRequired = errors.New("Config.Name field is required.")
|
||||||
|
|||||||
+2
-2
@@ -108,8 +108,8 @@ func (s *darwinLaunchdService) Install() error {
|
|||||||
}{
|
}{
|
||||||
Config: s.Config,
|
Config: s.Config,
|
||||||
Path: path,
|
Path: path,
|
||||||
KeepAlive: s.KV.bool("KeepAlive", true),
|
KeepAlive: s.Option.bool("KeepAlive", true),
|
||||||
RunAtLoad: s.KV.bool("RunAtLoad", false),
|
RunAtLoad: s.Option.bool("RunAtLoad", false),
|
||||||
}
|
}
|
||||||
|
|
||||||
functions := template.FuncMap{
|
functions := template.FuncMap{
|
||||||
|
|||||||
+1
-1
@@ -194,7 +194,7 @@ func (ws *windowsService) Install() error {
|
|||||||
Description: ws.Description,
|
Description: ws.Description,
|
||||||
StartType: mgr.StartAutomatic,
|
StartType: mgr.StartAutomatic,
|
||||||
ServiceStartName: ws.UserName,
|
ServiceStartName: ws.UserName,
|
||||||
Password: ws.KV.string("Password", ""),
|
Password: ws.Option.string("Password", ""),
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|||||||
Reference in New Issue
Block a user