Skip to content

Commit

Permalink
fix: omitempty targeting field in Flag structure (open-feature#247)
Browse files Browse the repository at this point in the history
## This PR
<!-- add the description of the PR here -->

Added omitempty to the json tags of the `targeting` field in the `Flag`
structure.

### Related Issues
<!-- add here the GitHub issue that this PR resolves if applicable -->

Fixes open-feature#246 

### Notes
<!-- any additional notes for this PR -->

### Follow-up Tasks
<!-- anything that is related to this PR but not done here should be
noted under this section -->
<!-- if there is a need for a new issue, please link it here -->

### How to test
<!-- if applicable, add testing instructions under this section -->

Signed-off-by: Skye Gill <gill.skye95@gmail.com>
  • Loading branch information
skyerus authored Jan 5, 2023
1 parent 2dbace5 commit 3f406b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/eval/json_evaluator_model.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@ type Flag struct {
State string `json:"state"`
DefaultVariant string `json:"defaultVariant"`
Variants map[string]any `json:"variants"`
Targeting json.RawMessage `json:"targeting"`
Targeting json.RawMessage `json:"targeting,omitempty"`
Source string `json:"source"`
}

0 comments on commit 3f406b5

Please sign in to comment.