WithPhase
Gets a new context with Phase set.
def WithPhase(
ctx: context.Context,
phase: string
) - > context.Context
Gets a new context with Phase set. This function is used to associate a specific phase string with a context, allowing subsequent operations to retrieve and utilize this phase information.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The original context to which the phase will be added. |
| phase | string | The string representing the phase to be associated with the context. |
Returns
| Type | Description |
|---|---|
context.Context | A new context.Context object that includes the specified phase. |