Init: bootstrap go module

This commit is contained in:
2025-09-04 11:01:05 +08:00
commit 6d7074198f
20 changed files with 658 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
package middlewares
import (
"net/http"
"gitea.konchin.com/ytshih/inp2025/game/tracing"
"github.com/uptrace/bunrouter"
)
func AccessLog(next bunrouter.HandlerFunc) bunrouter.HandlerFunc {
return func(w http.ResponseWriter, req bunrouter.Request) error {
tracing.Logger.Ctx(req.Context()).
Info(req.Method + " " + req.Params().Route())
return next(w, req)
}
}