mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-17 02:06:35 +00:00
chore(deps): update golangci/golangci-lint-action action to v7 (#1976)
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
@@ -164,29 +164,3 @@ func (instance *Instance) GetClassName() (string, error) {
|
||||
|
||||
return windows.UTF16PtrToString(classNameUTF16), nil
|
||||
}
|
||||
|
||||
func Instance_Print(instance *Instance) (string, error) {
|
||||
elementMap := map[string]any{}
|
||||
|
||||
properties := instance.classDecl.Properties()
|
||||
|
||||
count, err := instance.GetElementCount()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
if count == 0 {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
for _, property := range properties {
|
||||
name := windows.UTF16PtrToString(property.Name)
|
||||
|
||||
element, _ := instance.GetElement(name)
|
||||
value, _ := element.GetValue()
|
||||
|
||||
elementMap[windows.UTF16PtrToString(property.Name)] = value
|
||||
}
|
||||
|
||||
return fmt.Sprintf("%v", elementMap), nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user