remove windows service not used global variable

Signed-off-by: gy95 <1015105054@qq.com>
This commit is contained in:
gy95 2021-06-17 11:11:30 +08:00
parent a68644ba24
commit e413b05407

View File

@ -29,10 +29,6 @@ import (
"golang.org/x/sys/windows/svc"
)
var (
service *handler
)
type handler struct {
tosvc chan bool
fromsvc chan error
@ -47,7 +43,6 @@ func InitService(serviceName string) error {
fromsvc: make(chan error),
}
service = h
var err error
go func() {
err = svc.Run(serviceName, h)