ctxid

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 21, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ID

func ID(ctx context.Context) uuid.UUID

ID retrieves the ID value from the provided context.

ctx: The context to retrieve the ID from. Returns: The ID value from the context, or an empty UUID if the context doesn't have an ID.

func WithID

func WithID(ctx context.Context, id string) context.Context

WithID returns a new context with the provided ID value.

ctx: The parent context. id: The ID value to attach to the context. Returns: A new context with the ID value attached.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL