diff --git a/windows/svc/security.go b/windows/svc/security.go index ef719c17..351d286f 100644 --- a/windows/svc/security.go +++ b/windows/svc/security.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build windows // +build windows package svc diff --git a/windows/svc/service.go b/windows/svc/service.go index 46c73a52..9ad6eb4d 100644 --- a/windows/svc/service.go +++ b/windows/svc/service.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build windows // +build windows // Package svc provides everything required to build Windows service. @@ -201,7 +202,6 @@ func serviceMain(argc uint32, argv **uint16) uintptr { theService.h = handle defer func() { theService.h = 0 - windows.CloseHandle(handle) }() var args16 []*uint16 hdr := (*unsafeheader.Slice)(unsafe.Pointer(&args16))