Merge pull request #102937 from gy95/service
remove windows service not used global variable
This commit is contained in:
commit
25e52d9177
@ -30,10 +30,6 @@ import (
|
||||
"golang.org/x/sys/windows/svc"
|
||||
)
|
||||
|
||||
var (
|
||||
service *handler
|
||||
)
|
||||
|
||||
type handler struct {
|
||||
tosvc chan bool
|
||||
fromsvc chan error
|
||||
@ -48,7 +44,6 @@ func InitService(serviceName string) error {
|
||||
fromsvc: make(chan error),
|
||||
}
|
||||
|
||||
service = h
|
||||
var err error
|
||||
go func() {
|
||||
err = svc.Run(serviceName, h)
|
||||
|
Loading…
Reference in New Issue
Block a user