Skip to content

Commit

Permalink
Cosmetics and typos
Browse files Browse the repository at this point in the history
  • Loading branch information
arl committed Feb 27, 2023
1 parent 73be775 commit 5367793
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions statsviz.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
// (preferred method):
//
// mux := http.NewServeMux()
// endpoint := statvis.NewEndpoint()
// endpoint := statviz.NewEndpoint()
// endpoint.Register(mux)
//
// Or register with [http.DefaultServeMux`]:
//
// endpoint := statvis.NewEndpoint()
// endpoint := statviz.NewEndpoint()
// endpoint.Register(http.DefaultServeMux)
//
// By default Statsviz is served at `/debug/statsviz/`. You can change that (and
Expand Down Expand Up @@ -144,6 +144,7 @@ func hijack(h http.Handler, plots *plot.List) http.HandlerFunc {
w.Header().Add("Content-Length", strconv.Itoa(buf.Len()))
w.Header().Add("Content-Type", "text/javascript; charset=utf-8")
buf.WriteTo(w)

return
}
h.ServeHTTP(w, r)
Expand All @@ -157,7 +158,7 @@ func (e *Endpoint) sendStats(conn *websocket.Conn, frequency time.Duration) erro

// If the websocket connection is initiated by an already open web ui
// (started by a previous process for example) then plotsdef.js won't be
// requested. So, call plots.config manually to ensure that the data
// requested. So, call plots.Config manually to ensure that the data
// structures inside 'plots' are correctly initialized.
e.plots.Config()

Expand Down

0 comments on commit 5367793

Please sign in to comment.