Add golint to test (#255)
* Add a new lint rule to the Makefile Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com> * Fix linter errors Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com> * Allow replacing the default apt mirror Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
parent
4176ba7b52
commit
5624732128
38 changed files with 297 additions and 151 deletions
|
@ -1,6 +1,7 @@
|
|||
package pprof
|
||||
|
||||
import (
|
||||
// expvar init routine adds the "/debug/vars" handler
|
||||
_ "expvar"
|
||||
"net/http"
|
||||
"net/http/pprof"
|
||||
|
@ -8,6 +9,7 @@ import (
|
|||
"github.com/Sirupsen/logrus"
|
||||
)
|
||||
|
||||
// Enable registers the "/debug/pprof" handler
|
||||
func Enable(address string) {
|
||||
http.Handle("/", http.RedirectHandler("/debug/pprof", http.StatusMovedPermanently))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue