From 0c022a77e157849c5133d274f414aaec974e0a32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Thu, 14 Jun 2018 16:21:56 +0300 Subject: [PATCH] fix pointer receiver --- internal/debug/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/debug/api.go b/internal/debug/api.go index 232834d8c0..86a4218f6a 100644 --- a/internal/debug/api.go +++ b/internal/debug/api.go @@ -191,7 +191,7 @@ func (*HandlerT) WriteMemProfile(file string) error { // Stacks returns a printed representation of the stacks of all goroutines. func (*HandlerT) Stacks() string { - var buf bytes.Buffer + buf := new(bytes.Buffer) pprof.Lookup("goroutine").WriteTo(buf, 2) return buf.String() }