Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc fixes #560

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/_debug/pprof.go → api/debug/pprof.go
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please revert dc277e9 - the package naming is deliberate

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package _debug
package debug

import (
"encoding/json"
Expand Down
4 changes: 2 additions & 2 deletions api/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (

"github.com/julienschmidt/httprouter"
"github.com/sirupsen/logrus"
"github.com/t2bot/matrix-media-repo/api/_debug"
"github.com/t2bot/matrix-media-repo/api/custom"
"github.com/t2bot/matrix-media-repo/api/debug"
"github.com/t2bot/matrix-media-repo/api/r0"
"github.com/t2bot/matrix-media-repo/api/routers"
"github.com/t2bot/matrix-media-repo/api/unstable"
Expand All @@ -26,7 +26,7 @@ func buildRoutes() http.Handler {
pprofSecret := os.Getenv("MEDIA_PPROF_SECRET_KEY")
if pprofSecret != "" {
logrus.Warn("Enabling pprof/debug http endpoints")
_debug.BindPprofEndpoints(router, pprofSecret)
debug.BindPprofEndpoints(router, pprofSecret)
}

// Standard (spec) features
Expand Down