@@ -27,12 +27,12 @@ import (
2727)
2828
2929type WindowsService struct {
30- params Parameters
31- app * Application
30+ settings Settings
31+ app * Application
3232}
3333
34- func NewWindowsService (params Parameters ) * WindowsService {
35- return & WindowsService {params : params }
34+ func NewWindowsService (settings Settings ) * WindowsService {
35+ return & WindowsService {settings : settings }
3636}
3737
3838// Execute implements https://godoc.org/golang.org/x/sys/windows/svc#Handler
@@ -81,7 +81,7 @@ func (s *WindowsService) Execute(args []string, requests <-chan svc.ChangeReques
8181
8282func (s * WindowsService ) start (elog * eventlog.Log , appErrorChannel chan error ) error {
8383 var err error
84- s .app , err = newWithEventViewerLoggingHook (s .params , elog )
84+ s .app , err = newWithEventViewerLoggingHook (s .settings , elog )
8585 if err != nil {
8686 return err
8787 }
@@ -120,9 +120,9 @@ func openEventLog(serviceName string) (*eventlog.Log, error) {
120120 return elog , nil
121121}
122122
123- func newWithEventViewerLoggingHook (params Parameters , elog * eventlog.Log ) (* Application , error ) {
124- params .LoggingOptions = append (
125- params .LoggingOptions ,
123+ func newWithEventViewerLoggingHook (settings Settings , elog * eventlog.Log ) (* Application , error ) {
124+ settings .LoggingOptions = append (
125+ settings .LoggingOptions ,
126126 zap .Hooks (func (entry zapcore.Entry ) error {
127127 msg := fmt .Sprintf ("%v\r \n \r \n Stack Trace:\r \n %v" , entry .Message , entry .Stack )
128128
@@ -143,5 +143,5 @@ func newWithEventViewerLoggingHook(params Parameters, elog *eventlog.Log) (*Appl
143143 }),
144144 )
145145
146- return New (params )
146+ return New (settings )
147147}
0 commit comments