summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/google
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/google')
-rw-r--r--vendor/github.com/google/gops/agent/agent.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/vendor/github.com/google/gops/agent/agent.go b/vendor/github.com/google/gops/agent/agent.go
index 441814c9..80be4bb6 100644
--- a/vendor/github.com/google/gops/agent/agent.go
+++ b/vendor/github.com/google/gops/agent/agent.go
@@ -16,6 +16,7 @@ import (
"net"
"os"
gosignal "os/signal"
+ "path/filepath"
"runtime"
"runtime/debug"
"runtime/pprof"
@@ -113,7 +114,7 @@ func Listen(opts Options) error {
return err
}
port := listener.Addr().(*net.TCPAddr).Port
- portfile = fmt.Sprintf("%s/%d", gopsdir, os.Getpid())
+ portfile = filepath.Join(gopsdir, strconv.Itoa(os.Getpid()))
err = ioutil.WriteFile(portfile, []byte(strconv.Itoa(port)), os.ModePerm)
if err != nil {
return err