mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-10-18 18:49:05 +02:00
hyperv: add virtual_hard_disk sub-collector (#2693)
Signed-off-by: EisenbergD <dominik.eisenberg@beiersdorf.com> Co-authored-by: EisenbergD <dominik.eisenberg@beiersdorf.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
EisenbergD
Claude Opus 5.5
parent
89c5df9d8b
commit
ec7dcdc259
@@ -303,6 +303,12 @@ func setField(miTag string, field reflect.Value, element *Element) error {
|
||||
}
|
||||
|
||||
field.Set(reflect.ValueOf(element.getUint16Array()))
|
||||
case ValueTypeSTRINGA:
|
||||
if field.Type() != reflect.TypeFor[[]string]() {
|
||||
return fmt.Errorf("cannot unmarshal STRINGA into field of type %s, expected []string", field.Type())
|
||||
}
|
||||
|
||||
field.Set(reflect.ValueOf(element.getStringArray()))
|
||||
default:
|
||||
return fmt.Errorf("unsupported value type: %d", element.valueType)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user