From 3b5c2f6463d05a0391b278e422e678f1bfb6a439 Mon Sep 17 00:00:00 2001 From: Matt Layher Date: Mon, 21 Jan 2019 11:44:55 -0500 Subject: [PATCH] collector: use path/filepath for handling file paths (#1228) Signed-off-by: Matt Layher --- collector/paths.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/collector/paths.go b/collector/paths.go index a3a61ad1..5057f756 100644 --- a/collector/paths.go +++ b/collector/paths.go @@ -14,10 +14,10 @@ package collector import ( - "path" + "path/filepath" "github.com/prometheus/procfs" - "gopkg.in/alecthomas/kingpin.v2" + kingpin "gopkg.in/alecthomas/kingpin.v2" ) var ( @@ -28,13 +28,13 @@ var ( ) func procFilePath(name string) string { - return path.Join(*procPath, name) + return filepath.Join(*procPath, name) } func sysFilePath(name string) string { - return path.Join(*sysPath, name) + return filepath.Join(*sysPath, name) } func rootfsFilePath(name string) string { - return path.Join(*rootfsPath, name) + return filepath.Join(*rootfsPath, name) }