mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-27 11:31:06 +01: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 {
|
||||
ep := entrypoint.FromCtx(parent.Context())
|
||||
if ep == nil {
|
||||
return gperr.New("entrypoint not initialized")
|
||||
}
|
||||
|
||||
r.task = parent.Subtask("excluded."+r.Name(), false)
|
||||
ep.ExcludedRoutes().Add(r.impl)
|
||||
|
||||
Reference in New Issue
Block a user