mi: Revert "replace all WMI calls with MI calls" (#1713)

This commit is contained in:
Jan-Otto Kröpke
2024-11-03 11:20:46 +01:00
committed by GitHub
parent c4f5d58a3e
commit 45d3eabab9
82 changed files with 738 additions and 2767 deletions

View File

@@ -35,11 +35,3 @@ func PDHEnabled() bool {
return false
}
func MIEnabled() bool {
if v, ok := os.LookupEnv("WINDOWS_EXPORTER_WMI_ENGINE"); ok && v == "mi" {
return true
}
return false
}

View File

@@ -17,14 +17,3 @@ 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
}