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