diff options
author | Matt Layher <mdlayher@gmail.com> | 2019-01-21 11:44:55 -0500 |
---|---|---|
committer | Ben Kochie <superq@gmail.com> | 2019-01-21 17:44:55 +0100 |
commit | 3b5c2f6463d05a0391b278e422e678f1bfb6a439 (patch) | |
tree | 033f74c904cecd3a39ba6ff0cafe182f5426b268 | |
parent | e7664852867694265b093f79a8d8a4dcf27d0e82 (diff) | |
download | prometheus_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.go | 10 |
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 @@ | |||
14 | package collector | 14 | package collector |
15 | 15 | ||
16 | import ( | 16 | import ( |
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 | ||
23 | var ( | 23 | var ( |
@@ -28,13 +28,13 @@ var ( | |||
28 | ) | 28 | ) |
29 | 29 | ||
30 | func procFilePath(name string) string { | 30 | func procFilePath(name string) string { |
31 | return path.Join(*procPath, name) | 31 | return filepath.Join(*procPath, name) |
32 | } | 32 | } |
33 | 33 | ||
34 | func sysFilePath(name string) string { | 34 | func sysFilePath(name string) string { |
35 | return path.Join(*sysPath, name) | 35 | return filepath.Join(*sysPath, name) |
36 | } | 36 | } |
37 | 37 | ||
38 | func rootfsFilePath(name string) string { | 38 | func rootfsFilePath(name string) string { |
39 | return path.Join(*rootfsPath, name) | 39 | return filepath.Join(*rootfsPath, name) |
40 | } | 40 | } |