change router's names to names with prefix Must, because they might panic
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user