good morning!!!!
Skip to content
GitLab
Explore
Sign in
Commits on Source (1)
fix: http app
· 6effe75f
a
authored
Feb 23, 2024
6effe75f
Hide whitespace changes
Inline
Side-by-side
fxchi/fxchi.go
View file @
6effe75f
...
...
@@ -24,6 +24,20 @@ type RouterParams struct {
Routes
[]
func
(
chi
.
Router
)
`group:"fxchi"`
}
type
RouteResults
struct
{
fx
.
Out
Route
func
(
chi
.
Router
)
`group:"fxchi"`
}
func
NewRoute
(
fn
func
(
r
chi
.
Router
))
func
()
RouteResults
{
return
func
()
RouteResults
{
return
RouteResults
{
Route
:
fn
,
}
}
}
func
RouterHandler
(
p
RouterParams
)
http
.
Handler
{
r
:=
chi
.
NewRouter
()
for
_
,
fn
:=
range
p
.
Routes
{
...
...