Tags: gburgyan/go-ctxdep
Tags
Add adapters and optional dependency support with validations Introduce an adapter pattern for partial function applications and extend dependency handling with `Optional()` and `GetOptional()` features to allow handling nil dependencies gracefully. Include exhaustive validations to prevent misuse of wrappers and invalid scenarios. Add extensive documentation and tests covering adapters, optional dependencies, advanced use cases, lifecycle management, and thread safety.
Refactor timing context naming in dependencies The timing context naming convention has been updated for improved consistency and clarity. Previously, all contexts were named 'CtxDep', but now the name reflects the target type. This change also includes an additional timing context detail that shows the generator signature. This update is reflected in the corresponding sections of the Readme.md file to ensure accurate documentation.
Move to sync.Map for slot storage. In certain pessimal cases, a slot can be created by either a parent hoist or slot cast operations. If that happened at the same time as a get, that could lead to a panic. Move to sync.Map to eliminate all possibility of a panic even in such cases.
PreviousNext