summaryrefslogtreecommitdiffhomepage
path: root/ipn/localapi/pprof.go
diff options
context:
space:
mode:
authorNick Khyl <nickk@tailscale.com>2024-12-05 13:16:48 -0600
committerNick Khyl <nickk@tailscale.com>2024-12-05 13:16:48 -0600
commit0267fe83b200f1702a2fa0a395442c02a053fadb (patch)
tree63654c55225eeb834de59a5a0bc8d19033c6145b /ipn/localapi/pprof.go
parent87546a5edf6b6503a87eeb2d666baba57398a066 (diff)
downloadtailscale-1.78.0.tar.xz
tailscale-1.78.0.zip
VERSION.txt: this is v1.78.0v1.78.0
Signed-off-by: Nick Khyl <nickk@tailscale.com>
Diffstat (limited to 'ipn/localapi/pprof.go')
-rw-r--r--ipn/localapi/pprof.go56
1 files changed, 28 insertions, 28 deletions
diff --git a/ipn/localapi/pprof.go b/ipn/localapi/pprof.go
index 8c9429b31..5cc4daca1 100644
--- a/ipn/localapi/pprof.go
+++ b/ipn/localapi/pprof.go
@@ -1,28 +1,28 @@
-// Copyright (c) Tailscale Inc & AUTHORS
-// SPDX-License-Identifier: BSD-3-Clause
-
-//go:build !ios && !android && !js
-
-// We don't include it on mobile where we're more memory constrained and
-// there's no CLI to get at the results anyway.
-
-package localapi
-
-import (
- "net/http"
- "net/http/pprof"
-)
-
-func init() {
- servePprofFunc = servePprof
-}
-
-func servePprof(w http.ResponseWriter, r *http.Request) {
- name := r.FormValue("name")
- switch name {
- case "profile":
- pprof.Profile(w, r)
- default:
- pprof.Handler(name).ServeHTTP(w, r)
- }
-}
+// Copyright (c) Tailscale Inc & AUTHORS
+// SPDX-License-Identifier: BSD-3-Clause
+
+//go:build !ios && !android && !js
+
+// We don't include it on mobile where we're more memory constrained and
+// there's no CLI to get at the results anyway.
+
+package localapi
+
+import (
+ "net/http"
+ "net/http/pprof"
+)
+
+func init() {
+ servePprofFunc = servePprof
+}
+
+func servePprof(w http.ResponseWriter, r *http.Request) {
+ name := r.FormValue("name")
+ switch name {
+ case "profile":
+ pprof.Profile(w, r)
+ default:
+ pprof.Handler(name).ServeHTTP(w, r)
+ }
+}