Merge pull request #102937 from gy95/service

remove windows service not used global variable
This commit is contained in:
Kubernetes Prow Robot 2021-09-15 21:41:45 -07:00 committed by GitHub
commit 25e52d9177
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)