struct

Noir::TreeSitterGoRouteExtractor::ScopedConfig

Inherits Struct < Value < Object

Chi-style extractor: walks the AST with a prefix stack so r.Route("/api", func(r chi.Router) { r.Get("/users", h) }) resolves to /api/users. Handles arbitrarily-nested .Route blocks plus .Group(func(r){ body }) (middleware group, no prefix change) and r.With(mw).Get(...) middleware chains (the verb receiver is any chain of .With(...) calls that bottoms out at an identifier).

skip_functions lets callers exclude function declarations whose body is analysed separately — e.g. chi.cr's analyze_router_function picks up adminRouter() under a Mount("/admin", adminRouter()), so re-emitting the same routes from the free-floating function body would duplicate them. Config for the scope-aware walker. Chi and gf share the same structural recognizer with different method names / extras.

Constructors

new(prefix_method : String = "Route", middleware_method : Nil | String = "Group", chain_prefix : Bool = false, bind_methods : Array(String) = [] of String, bind_method_verb : String = "ALL", net_http_methods : Bool = false)
Source

Instance methods

bind_method_verb
Source
bind_methods
Source
chain_prefix?
Source
middleware_method
Source
net_http_methods?
Source
prefix_method
Source