TUN-9016: update go to 1.24

## Summary

Update several moving parts of cloudflared build system:

* use goboring 1.24.2 in cfsetup
* update linter and fix lint issues
* update packages namely **quic-go and net**
* install script for macos
* update docker files to use go 1.24.1
* remove usage of cloudflare-go
* pin golang linter

Closes TUN-9016
This commit is contained in:
Luis Neto
2025-06-06 09:05:49 +00:00
parent e144eac2af
commit 96ce66bd30
585 changed files with 23572 additions and 21356 deletions

View File

@@ -132,10 +132,10 @@ type ctlEvent struct {
// service provides access to windows service api.
type service struct {
name string
h windows.Handle
c chan ctlEvent
handler Handler
namePointer *uint16
h windows.Handle
c chan ctlEvent
handler Handler
}
type exitCode struct {
@@ -209,7 +209,7 @@ var theService service // This is, unfortunately, a global, which means only one
// serviceMain is the entry point called by the service manager, registered earlier by
// the call to StartServiceCtrlDispatcher.
func serviceMain(argc uint32, argv **uint16) uintptr {
handle, err := windows.RegisterServiceCtrlHandlerEx(windows.StringToUTF16Ptr(theService.name), ctlHandlerCallback, 0)
handle, err := windows.RegisterServiceCtrlHandlerEx(theService.namePointer, ctlHandlerCallback, 0)
if sysErr, ok := err.(windows.Errno); ok {
return uintptr(sysErr)
} else if err != nil {
@@ -280,15 +280,21 @@ loop:
// Run executes service name by calling appropriate handler function.
func Run(name string, handler Handler) error {
// Check to make sure that the service name is valid.
namePointer, err := windows.UTF16PtrFromString(name)
if err != nil {
return err
}
initCallbacks.Do(func() {
ctlHandlerCallback = windows.NewCallback(ctlHandler)
serviceMainCallback = windows.NewCallback(serviceMain)
})
theService.name = name
theService.namePointer = namePointer
theService.handler = handler
theService.c = make(chan ctlEvent)
t := []windows.SERVICE_TABLE_ENTRY{
{ServiceName: windows.StringToUTF16Ptr(theService.name), ServiceProc: serviceMainCallback},
{ServiceName: namePointer, ServiceProc: serviceMainCallback},
{ServiceName: nil, ServiceProc: 0},
}
return windows.StartServiceCtrlDispatcher(&t[0])