mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-22 04:36:35 +00:00
chore(deps): update dependency golangci/golangci-lint to v2.2.1 (#2110)
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:
@@ -549,8 +549,8 @@ func FormatError(msgID uint32) string {
|
||||
var flags uint32 = windows.FORMAT_MESSAGE_FROM_HMODULE | windows.FORMAT_MESSAGE_ARGUMENT_ARRAY | windows.FORMAT_MESSAGE_IGNORE_INSERTS
|
||||
|
||||
buf := make([]uint16, 300)
|
||||
_, err := windows.FormatMessage(flags, libPdhDll.Handle(), msgID, 0, buf, nil)
|
||||
|
||||
_, err := windows.FormatMessage(flags, libPdhDll.Handle(), msgID, 0, buf, nil)
|
||||
if err == nil {
|
||||
return windows.UTF16PtrToString(&buf[0])
|
||||
}
|
||||
|
||||
@@ -54,6 +54,7 @@ func NewCollector[T any](object string, _ []string) (*Collector, error) {
|
||||
}
|
||||
|
||||
var values [0]T
|
||||
|
||||
valueType := reflect.TypeOf(values).Elem()
|
||||
|
||||
if f, ok := valueType.FieldByName("Name"); ok {
|
||||
|
||||
Reference in New Issue
Block a user