Skip to content

mistifyio/negroni-pprof

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

negroni-pprof

GoDoc Build Status

pprof middleware for Negroni

pprof

pprof middleware for Negroni.

A simple middleware for handling pprof. This handles "/debug/pprof" paths

Note: this implementation is sub-optimal, but works.

Usage

import (
    "github.com/codegangsta/negroni"
    "github.com/mistifyio/negroni-pprof"
)

func main() {
    mux := http.NewServeMux()
    mux.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) {
      fmt.Fprintf(w, "Welcome to the home page!")
    }
    n := negroni.Classic()
    n.Use(pprof.Pprof())
    n.UseHandler(mux)
    n.Run(":3000")
}

About

pprof middleware for Negroni

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages