Module returns the current module, or the most recent one provisioned by the context.
()
| 661 | // Module returns the current module, or the most recent one |
| 662 | // provisioned by the context. |
| 663 | func (ctx Context) Module() Module { |
| 664 | if len(ctx.ancestry) == 0 { |
| 665 | return nil |
| 666 | } |
| 667 | return ctx.ancestry[len(ctx.ancestry)-1] |
| 668 | } |
| 669 | |
| 670 | // WithValue returns a new context with the given key-value pair. |
| 671 | func (ctx *Context) WithValue(key, value any) Context { |