Skip to content

fix: replace character slice with regex replace - #250

Merged
james-milligan merged 9 commits into
open-feature:mainfrom
james-milligan:json-indent
Jan 12, 2023
Merged

james-milligan merged 9 commits into
open-feature:mainfrom
james-milligan:json-indent

Conversation

@james-milligan

Copy link
Copy Markdown
Contributor

Signed-off-by: James Milligan james@omnant.co.uk

This PR

  • fixes transpose evaluator state parsing when state contains trailing characters

Related Issues

#244

Notes

switches from a hard coded 1:n-2 slice to use regex to match and replace the first { and last } in the string.

Follow-up Tasks

How to test

@james-milligan

Copy link
Copy Markdown
Contributor Author

These changes also mean that we no longer need to json.MarshalIndent anymore (I believe), happy to replace with json.Marshal provided im not missing another reason for its use?

cc @vadasambar

@james-milligan
james-milligan marked this pull request as draft January 10, 2023 14:10
@vadasambar

Copy link
Copy Markdown
Contributor

These changes also mean that we no longer need to json.MarshalIndent anymore (I believe), happy to replace with json.Marshal provided im not missing another reason for its use?

cc @vadasambar

Thank you and yes, we can replace json.MarshalIndent with json.Marshal

@james-milligan
james-milligan marked this pull request as ready for review January 10, 2023 16:11
Signed-off-by: James Milligan <james@omnant.co.uk>
Signed-off-by: James Milligan <james@omnant.co.uk>
Signed-off-by: James Milligan <james@omnant.co.uk>
Signed-off-by: James Milligan <james@omnant.co.uk>
Signed-off-by: James Milligan <james@omnant.co.uk>
Signed-off-by: James Milligan <james@omnant.co.uk>
Signed-off-by: James Milligan <james@omnant.co.uk>
@james-milligan
james-milligan merged commit c92d101 into open-feature:main Jan 12, 2023
@james-milligan
james-milligan deleted the json-indent branch January 12, 2023 09:54
james-milligan pushed a commit that referenced this pull request Jan 12, 2023
🤖 I have created a release *beep* *boop*
---


##
[0.3.1](v0.3.0...v0.3.1)
(2023-01-12)


### Features

* file extension detection
([#257](#257))
([ca22541](ca22541))
* ResolveAll endpoint for bulk evaluation
([#239](#239))
([6437c43](6437c43))


### Bug Fixes

* **deps:** update module github.com/bufbuild/connect-go to v1.4.1
([#268](#268))
([712d7dd](712d7dd))
* **deps:** update module github.com/mattn/go-colorable to v0.1.13
([#260](#260))
([5b11504](5b11504))
* **deps:** update module github.com/open-feature/open-feature-operator
to v0.2.23 ([#261](#261))
([a1dd3b9](a1dd3b9))
* **deps:** update module github.com/rs/cors to v1.8.3
([#264](#264))
([0e6f2f3](0e6f2f3))
* **deps:** update module github.com/stretchr/testify to v1.8.1
([#265](#265))
([2ec61c6](2ec61c6))
* improve invalid sync URI errror msg
([#252](#252))
([5939870](5939870))
* replace character slice with regex replace
([#250](#250))
([c92d101](c92d101))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
raphael-wigoutschnigg-dt pushed a commit to open-feature-forking/flagd that referenced this pull request Mar 11, 2025
Signed-off-by: Thomas Poignant <thomas.poignant@gofeatureflag.org>
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.

[BUG] flagd (transposeEvaluators fn) doesn't understand json without indentations

4 participants