change router's names to names with prefix Must, because they might panic

This commit is contained in:
2025-12-17 14:32:49 +02:00
parent 8896188ec4
commit 16cb8c7f58
3 changed files with 12 additions and 6 deletions

View File

@@ -29,7 +29,10 @@ type blockHandler 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 := &blockHandler{
cfg: config,
}