StackExchange / wmi

WMI for Go
http://godoc.org/github.com/StackExchange/wmi
MIT License
434 stars 173 forks source link

Add support for string arrays #5

Closed gbrayut closed 7 years ago

gbrayut commented 9 years ago

The IP address in Win32_NetworkAdapterConfiguration returned as a string array

See http://msdn.microsoft.com/en-us/library/aa394217(v=vs.85).aspx

gbrayut commented 9 years ago

See https://github.com/bosun-monitor/scollector/blob/win_network/metadata/metadata_windows.go#L78 for an instance where this is blocking. When trying to use the IPAddress property as either a []string or a string I get the following error:

2014/11/10 18:49:33 error: metadata_windows.go:37: wmi: cannot load field "IPAddress" into a "[]string": unsupported type
2014/11/10 18:50:02 error: metadata_windows.go:37: wmi: cannot load field "IPAddress" into a "string": unsupported type

Also for some reason the MACAddress does not work as a string. Error message:

2014/11/10 19:10:45 error: metadata_windows.go:37: wmi: cannot load field "MACAddress" into a "string": unsupported type
Durgababu commented 8 years ago

Hi,

what is the update on this issue? still it is not supporting string arrays.

Durgababu commented 8 years ago

Add support for string arrays #5

how can we address this issue?

wmi: cannot load field "ChassisTypes" into a "[]string": unsupported type ()

when are you going to provide the fix for array type of values?

please update me soon

graf0 commented 7 years ago

Just tested gesquive patch - working wonderfully :+1: