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: parsing numbers in templates #868

Merged
merged 1 commit into from
Mar 17, 2023
Merged

Conversation

zekth
Copy link
Member

@zekth zekth commented Mar 17, 2023

Follow-up of #867

@zekth zekth requested a review from a team March 17, 2023 10:16
@zekth zekth temporarily deployed to Configure ci March 17, 2023 10:16 — with GitHub Actions Inactive
Plugin: kong.Plugin{
Name: kong.String("foofloat"),
Config: kong.Configuration{
"foo": *kong.Float64(1337),
Copy link
Member Author

Choose a reason for hiding this comment

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

weirdly the assertions seems to fail on this one if i don't use the value. However it works fine for the parseInt.

Copy link
Collaborator

Choose a reason for hiding this comment

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

That's because plugins' config stores actual values, not pointers (like for other non-plugin entities). You can rewrite this as float64(1337).

@codecov-commenter
Copy link

codecov-commenter commented Mar 17, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.03 🎉

Comparison is base (ff70966) 35.56% compared to head (9c47085) 35.59%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #868      +/-   ##
==========================================
+ Coverage   35.56%   35.59%   +0.03%     
==========================================
  Files          92       92              
  Lines       11267    11273       +6     
==========================================
+ Hits         4007     4013       +6     
  Misses       6867     6867              
  Partials      393      393              
Impacted Files Coverage Δ
file/readfile.go 84.61% <100.00%> (+0.83%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@zekth zekth temporarily deployed to Configure ci March 17, 2023 10:58 — with GitHub Actions Inactive
@zekth zekth temporarily deployed to Configure ci March 17, 2023 10:58 — with GitHub Actions Inactive
@GGabriele GGabriele merged commit 40350a0 into main Mar 17, 2023
@GGabriele GGabriele deleted the feat/parsing-templates branch March 17, 2023 11:14
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