StackExchange / wmi

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

Add behaviour control for nil field value handling #8

Closed stevenh closed 9 years ago

stevenh commented 9 years ago

Add concept of a WMI Client which allows the consumer to control how nil values are handled.

By default this maintains compatibility with the original implementation which:

Creating a custom client allows the configuration of how:

The missing field option is useful as it allows the full struct definition to be used with custom queries that only return a partial set of information which they require, instead of having to create an alternative struct only those fields.

Also fix miss-match errors information returning "" vs "*" for pointer fields which can be confusing.

darkliquid commented 9 years ago

:+1: