change router's names to names with prefix Must, because they might panic
This commit is contained in:
@@ -13,7 +13,10 @@ type authHandler struct {
|
||||
cfg *config.Config
|
||||
}
|
||||
|
||||
func Route(config *config.Config) func(chi.Router) {
|
||||
func MustRoute(config *config.Config) func(chi.Router) {
|
||||
if config == nil {
|
||||
panic("config is nil")
|
||||
}
|
||||
h := &authHandler{
|
||||
cfg: config,
|
||||
}
|
||||
@@ -31,4 +34,4 @@ func (h *authHandler) handleLogout(w http.ResponseWriter, r *http.Request) {}
|
||||
|
||||
func (h *authHandler) handleMe(w http.ResponseWriter, r *http.Request) {}
|
||||
|
||||
func (h *authHandler) handleRevoke(w http.ResponseWriter, r *http.Request) {}
|
||||
func (h *authHandler) handleRevoke(w http.ResponseWriter, r *http.Request) {}
|
||||
|
||||
Reference in New Issue
Block a user