aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Layher <mdlayher@gmail.com>2019-01-21 11:44:55 -0500
committerBen Kochie <superq@gmail.com>2019-01-21 17:44:55 +0100
commit3b5c2f6463d05a0391b278e422e678f1bfb6a439 (patch)
tree033f74c904cecd3a39ba6ff0cafe182f5426b268
parente7664852867694265b093f79a8d8a4dcf27d0e82 (diff)
downloadprometheus_node_collector-3b5c2f6463d05a0391b278e422e678f1bfb6a439.tar.bz2
prometheus_node_collector-3b5c2f6463d05a0391b278e422e678f1bfb6a439.tar.xz
prometheus_node_collector-3b5c2f6463d05a0391b278e422e678f1bfb6a439.zip
collector: use path/filepath for handling file paths (#1228)
Signed-off-by: Matt Layher <mdlayher@gmail.com>
-rw-r--r--collector/paths.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/collector/paths.go b/collector/paths.go
index a3a61ad..5057f75 100644
--- a/collector/paths.go
+++ b/collector/paths.go
@@ -14,10 +14,10 @@
14package collector 14package collector
15 15
16import ( 16import (
17 "path" 17 "path/filepath"
18 18
19 "github.com/prometheus/procfs" 19 "github.com/prometheus/procfs"
20 "gopkg.in/alecthomas/kingpin.v2" 20 kingpin "gopkg.in/alecthomas/kingpin.v2"
21) 21)
22 22
23var ( 23var (
@@ -28,13 +28,13 @@ var (
28) 28)
29 29
30func procFilePath(name string) string { 30func procFilePath(name string) string {
31 return path.Join(*procPath, name) 31 return filepath.Join(*procPath, name)
32} 32}
33 33
34func sysFilePath(name string) string { 34func sysFilePath(name string) string {
35 return path.Join(*sysPath, name) 35 return filepath.Join(*sysPath, name)
36} 36}
37 37
38func rootfsFilePath(name string) string { 38func rootfsFilePath(name string) string {
39 return path.Join(*rootfsPath, name) 39 return filepath.Join(*rootfsPath, name)
40} 40}