mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-23 01:08:47 +02:00
fix: add nil guard to Route.start
This commit is contained in:
@@ -521,6 +521,9 @@ func (r *Route) start(parent task.Parent) gperr.Error {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ep := entrypoint.FromCtx(parent.Context())
|
ep := entrypoint.FromCtx(parent.Context())
|
||||||
|
if ep == nil {
|
||||||
|
return gperr.New("entrypoint not initialized")
|
||||||
|
}
|
||||||
|
|
||||||
r.task = parent.Subtask("excluded."+r.Name(), false)
|
r.task = parent.Subtask("excluded."+r.Name(), false)
|
||||||
ep.ExcludedRoutes().Add(r.impl)
|
ep.ExcludedRoutes().Add(r.impl)
|
||||||
|
|||||||
Reference in New Issue
Block a user