Skip to content

Added type-safe context utils with key-value functions and tests #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 18, 2024

Conversation

shahzadhaider1
Copy link
Collaborator

Title: Add context utils

Description

In this PR, we have added type-safe context utility functions for setting and retrieving values.

  • Introduced a new package ctxutils
  • Implemented SetValue and GetValue functions for string and int types.
  • Ensured type safety by using specific key-value functions instead of interfaces.
  • Added unit tests to validate the correct usage of typed keys and values.

Issue Link: #1

@shahzadhaider1 shahzadhaider1 added the enhancement New feature or request label Oct 17, 2024
@shahzadhaider1 shahzadhaider1 self-assigned this Oct 17, 2024
@shahzadhaider1 shahzadhaider1 linked an issue Oct 17, 2024 that may be closed by this pull request
Copy link
Owner

@kashifkhan0771 kashifkhan0771 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you @shahzadhaider1

@kashifkhan0771 kashifkhan0771 merged commit a1ff267 into main Oct 18, 2024
@kashifkhan0771 kashifkhan0771 deleted the feature/ctx-utils branch October 18, 2024 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add context utils
2 participants