Skip to content
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

feat: EvaluationContext add constructor without TargetingKey #204

Merged
merged 1 commit into from
Jul 28, 2023

Conversation

thomaspoignant
Copy link
Member

This PR

Based on this discussion we have discovered that in some cases we want to create an EvaluationContext without Targeting key.

WithNewEvaluationContext it was mandatory to set a targetingKey forcing us to set an empty targetingKey sometimes.

In this PR we add a new constructor called NewTargetlessEvaluationContext that is doing exactly the same things as NewEvaluationContext but does not force you to add a targetingKey.

Signed-off-by: Thomas Poignant <thomas.poignant@gofeatureflag.org>
@codecov
Copy link

codecov bot commented Jul 27, 2023

Codecov Report

Merging #204 (40ffb01) into main (a2987b8) will increase coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #204      +/-   ##
==========================================
+ Coverage   78.95%   78.99%   +0.03%     
==========================================
  Files           9        9              
  Lines        1074     1076       +2     
==========================================
+ Hits          848      850       +2     
  Misses        204      204              
  Partials       22       22              
Files Changed Coverage Δ
pkg/openfeature/evaluation_context.go 82.60% <100.00%> (+1.65%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@thomaspoignant thomaspoignant changed the title Add constructor without TargetingKey feat: Add constructor without TargetingKey Jul 27, 2023
@thomaspoignant thomaspoignant changed the title feat: Add constructor without TargetingKey feat: EvaluationContext add constructor without TargetingKey Jul 27, 2023
Copy link
Member

@beeme1mr beeme1mr left a comment

Choose a reason for hiding this comment

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

Thanks @thomaspoignant! I'll update the readme when this is live

Copy link
Member

@toddbaert toddbaert left a comment

Choose a reason for hiding this comment

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

nice

@toddbaert toddbaert merged commit 07f4974 into main Jul 28, 2023
8 checks passed
@toddbaert toddbaert deleted the targetless-cvaluation-context branch July 28, 2023 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants