mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-22 04:36:35 +00:00
chore: Move private packages to internal (#1664)
This commit is contained in:
19
internal/utils/utils.go
Normal file
19
internal/utils/utils.go
Normal file
@@ -0,0 +1,19 @@
|
||||
//go:build windows
|
||||
|
||||
package utils
|
||||
|
||||
func MilliSecToSec(t float64) float64 {
|
||||
return t / 1000
|
||||
}
|
||||
|
||||
func BoolToFloat(b bool) float64 {
|
||||
if b {
|
||||
return 1.0
|
||||
}
|
||||
|
||||
return 0.0
|
||||
}
|
||||
|
||||
func ToPTR[t any](v t) *t {
|
||||
return &v
|
||||
}
|
||||
Reference in New Issue
Block a user