mirror of
https://github.com/prometheus/node_exporter.git
synced 2024-12-28 06:59:44 -08:00
collector: use path/filepath for handling file paths (#1228)
Signed-off-by: Matt Layher <mdlayher@gmail.com>
This commit is contained in:
parent
e766485286
commit
3b5c2f6463
|
@ -14,10 +14,10 @@
|
||||||
package collector
|
package collector
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"path"
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/prometheus/procfs"
|
"github.com/prometheus/procfs"
|
||||||
"gopkg.in/alecthomas/kingpin.v2"
|
kingpin "gopkg.in/alecthomas/kingpin.v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -28,13 +28,13 @@ var (
|
||||||
)
|
)
|
||||||
|
|
||||||
func procFilePath(name string) string {
|
func procFilePath(name string) string {
|
||||||
return path.Join(*procPath, name)
|
return filepath.Join(*procPath, name)
|
||||||
}
|
}
|
||||||
|
|
||||||
func sysFilePath(name string) string {
|
func sysFilePath(name string) string {
|
||||||
return path.Join(*sysPath, name)
|
return filepath.Join(*sysPath, name)
|
||||||
}
|
}
|
||||||
|
|
||||||
func rootfsFilePath(name string) string {
|
func rootfsFilePath(name string) string {
|
||||||
return path.Join(*rootfsPath, name)
|
return filepath.Join(*rootfsPath, name)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue