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

[TT-1190] support multiple configuration names #13649

Merged
merged 11 commits into from
Jun 28, 2024

Conversation

Tofel
Copy link
Contributor

@Tofel Tofel commented Jun 21, 2024

Adds the following change:

config, err = tc.GetConfig([]string{"A", "B", "C"}, tc.VRFv2Plus)
require.NoError(t, err, "Error getting config")

which means that in this case the overriding order would be:

  • configuration without any name
  • "A" configuration
  • "B" configuration
  • "C" configuration

If config had this structure:

struct Config type {
     Text_1 string `toml:"text_1"`
     Text_2 string `toml:"text_2"`
     Text_3 string `toml:"text_3"`
     Text_4 string `toml:"text_4"`
}

and if TOML looked like this:

text_1 = "first"
text_2 = "second"
text_3 = "third"
text_4 = "original"

[A]
text_1 = "overwritten_from_A"

[B]
text_2 = "overwritten_from_B"

[C]
text_3 = "overwritten_from_C"

The result would be:

text_1 = "overwritten_from_A"
text_2 = "overwritten_from_B*"
text_3 = "overwritten_from_C"
text_4 = "original"

@Tofel Tofel marked this pull request as ready for review June 21, 2024 14:31
@Tofel Tofel requested review from a team as code owners June 21, 2024 14:31
@Tofel
Copy link
Contributor Author

Tofel commented Jun 21, 2024

needs OK from @iljapavlovs before merging

@Tofel Tofel requested a review from iljapavlovs June 21, 2024 14:31
@gheorghestrimtu
Copy link
Contributor

[]string ftw

skudasov
skudasov previously approved these changes Jun 27, 2024
@cl-sonarqube-production
Copy link

@Tofel Tofel added this pull request to the merge queue Jun 28, 2024
Merged via the queue into develop with commit a0b85e4 Jun 28, 2024
112 checks passed
@Tofel Tofel deleted the tt_1090_multiple_named_configurations branch June 28, 2024 09:13
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.

5 participants