From 8897eba6760c3aa10bfe61285335e94317a6eb53 Mon Sep 17 00:00:00 2001 From: shirou Date: Thu, 20 Feb 2025 21:43:07 +0900 Subject: [PATCH] [windows]: fix lint error about use-any --- internal/common/common_windows.go | 2 +- net/net_windows.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/common/common_windows.go b/internal/common/common_windows.go index e7e82202b..09ecf5982 100644 --- a/internal/common/common_windows.go +++ b/internal/common/common_windows.go @@ -197,7 +197,7 @@ func ProcessorQueueLengthCounter() (*Win32PerformanceCounter, error) { } // WMIQueryWithContext - wraps wmi.Query with a timed-out context to avoid hanging -func WMIQueryWithContext(ctx context.Context, query string, dst interface{}, connectServerArgs ...interface{}) error { +func WMIQueryWithContext(ctx context.Context, query string, dst any, connectServerArgs ...any) error { if _, ok := ctx.Deadline(); !ok { ctxTimeout, cancel := context.WithTimeout(ctx, Timeout) defer cancel() diff --git a/net/net_windows.go b/net/net_windows.go index 1dff373cd..aa3cb6731 100644 --- a/net/net_windows.go +++ b/net/net_windows.go @@ -328,7 +328,7 @@ func getTableUintptr(family uint32, buf []byte) uintptr { return p } -func getTableInfo(filename string, table interface{}) (index, step, length int) { +func getTableInfo(filename string, table any) (index, step, length int) { switch filename { case kindTCP4.filename: index = int(unsafe.Sizeof(table.(pmibTCPTableOwnerPidAll).DwNumEntries))