mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-08 05:56:37 +00:00
mi: replace all WMI calls with MI calls (#1714)
This commit is contained in:
@@ -17,3 +17,14 @@ func BoolToFloat(b bool) float64 {
|
||||
func ToPTR[t any](v t) *t {
|
||||
return &v
|
||||
}
|
||||
|
||||
// Must panics if the error is not nil.
|
||||
//
|
||||
//nolint:ireturn
|
||||
func Must[T any](v T, err error) T {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
return v
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user