Merge pull request #1795 from shirou/feat/fix_revice_lint_error_on_any

[windows]: fix lint error about use-any
pull/1796/head
shirou 3 weeks ago committed by GitHub
commit 23ceac30ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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

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

Loading…
Cancel
Save