From 9a74b6fe2e974ba2aa8a991608de7350210500c5 Mon Sep 17 00:00:00 2001 From: shirou Date: Tue, 13 Feb 2018 22:21:27 +0900 Subject: [PATCH] [cpu]windows: fix retrun value. --- cpu/cpu_windows.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpu/cpu_windows.go b/cpu/cpu_windows.go index a95df9f8..a44a0893 100644 --- a/cpu/cpu_windows.go +++ b/cpu/cpu_windows.go @@ -133,7 +133,7 @@ func PerfInfoWithContext(ctx context.Context) ([]Win32_PerfFormattedData_Counter defer cancel() err := common.WMIQueryWithContext(ctx, q, &ret) if err != nil { - return Win32_PerfFormattedData_Counters_ProcessorInformation{}, err + return []Win32_PerfFormattedData_Counters_ProcessorInformation{}, err } return ret, err @@ -152,7 +152,7 @@ func ProcInfoWithContext(ctx context.Context) ([]Win32_PerfFormattedData_PerfOS_ defer cancel() err := common.WMIQueryWithContext(ctx, q, &ret) if err != nil { - return Win32_PerfFormattedData_PerfOS_System{}, err + return []Win32_PerfFormattedData_PerfOS_System{}, err } return ret, err }