refactor: pass procfs location to docker_tls_args on command line

...rather than via an env var. This is cleaner.
This commit is contained in:
Matthias Radestock committed 2016-01-01 23:52:46 +00:00
1 parent 9c31de9cb9
commit be8260ae79
2 files changed
+5 -6

No files matched your search

+4 -5
View File
@@ -1,6 +1,5 @@
// docker_tls_args: find the docker daemon's tls args
// This reimplements pgrep, because pgrep will only look in /proc, but not in
// $PROCFS.
// This reimplements pgrep, because pgrep will only look in /proc.
package main
import (
@@ -14,9 +13,9 @@ import (
)
func main() {
procRoot := os.Getenv("PROCFS")
if procRoot == "" {
procRoot = "/proc"
procRoot := "/proc"
if len(os.Args) > 1 {
procRoot = os.Args[1]
}
dirEntries, err := ioutil.ReadDir(procRoot)