MCPcopy
hub / github.com/yusing/godoxy / NewStartedTestRoute

Function NewStartedTestRoute

internal/route/test_route.go:12–32  ·  view source on GitHub ↗
(tb testing.TB, base *Route)

Source from the content-addressed store, hash-verified

10)
11
12func NewStartedTestRoute(tb testing.TB, base *Route) (types.Route, error) {
13 tb.Helper()
14
15 task := task.GetTestTask(tb)
16 if ep := epctx.FromCtx(task.Context()); ep == nil {
17 ep = entrypoint.NewEntrypoint(task, nil)
18 epctx.SetCtx(task, ep)
19 }
20
21 err := base.Validate()
22 if err != nil {
23 return nil, err
24 }
25
26 err = base.Start(task)
27 if err != nil {
28 return nil, err
29 }
30
31 return base.impl, nil
32}

Calls 4

NewEntrypointFunction · 0.92
ContextMethod · 0.65
ValidateMethod · 0.65
StartMethod · 0.65