service: rename Config.KV to Config.Option.

This commit is contained in:
Daniel Theophanes
2015-01-18 16:22:48 -08:00
parent 11801c088b
commit d3ed54b2d3
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -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
View File
@@ -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
View File
@@ -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