From df6e1bc64d14e0af76e5351eafe228b3d2ec451a Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Mon, 27 Aug 2018 19:13:35 +0200 Subject: [PATCH] privatize pprofServer --- daemon/pprof.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/daemon/pprof.go b/daemon/pprof.go index 2296ebd..6c96251 100644 --- a/daemon/pprof.go +++ b/daemon/pprof.go @@ -9,7 +9,7 @@ import ( "net/http/pprof" ) -type PProfServer struct { +type pprofServer struct { cc chan PprofServerControlMsg state PprofServerControlMsg listener net.Listener @@ -22,9 +22,9 @@ type PprofServerControlMsg struct { HttpListenAddress string } -func NewPProfServer(ctx context.Context) *PProfServer { +func NewPProfServer(ctx context.Context) *pprofServer { - s := &PProfServer{ + s := &pprofServer{ cc: make(chan PprofServerControlMsg), } @@ -32,7 +32,7 @@ func NewPProfServer(ctx context.Context) *PProfServer { return s } -func (s *PProfServer) controlLoop(ctx context.Context) { +func (s *pprofServer) controlLoop(ctx context.Context) { outer: for { @@ -75,6 +75,6 @@ outer: } } -func (s *PProfServer) Control(msg PprofServerControlMsg) { +func (s *pprofServer) Control(msg PprofServerControlMsg) { s.cc <- msg }