code: func NewRouter(cfg *Config, routes []*Route) *Router {
  	handlers := httpHandlers(routes)
  	r := &Router{
  		optHandlers:    handlers[http.MethodOptions],
  		headHandlers:   handlers[http.MethodHead],
  		getHandlers:    handlers[http.MethodGet],
  		postHandlers:   handlers[http.MethodPost],
  		putHandlers:    handlers[http.MethodPut],
  		patchHandlers:  handlers[http.MethodPatch],
  		deleteHandlers: handlers[http.MethodDelete],
  
  		NotFound:   http.NotFound,
  		AppContext: make(map[string]interface{}),
  		config:     cfg,
  	}
  
  	// setting the default serve handler
  	r.serveHandler = r.serve
  
  	return r
  }
docs: // NewRouter initializes returns a new router instance with all the configurations and routes set