Skip to main content

WithNamespace

Gets a new context with namespace set.

def WithNamespace(
ctx: context.Context,
namespace: string
) - > context.Context

Gets a new context with namespace set.

Parameters

NameTypeDescription
ctxcontext.ContextThe parent context to which the namespace will be added.
namespacestringThe namespace string to be set in the context.

Returns

TypeDescription
context.ContextA new context with the specified namespace value associated with NamespaceKey.