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: add hasField method for use with structs #61

Merged
merged 3 commits into from
Aug 22, 2024

Conversation

mbezhanov
Copy link

Description

Closes #60

Changes

The PR introduces a hasField method to the reflect registry, to address the use case explained in #60.

Checklist

  • I have read the CONTRIBUTING.md document.
  • My code follows the code style of this project.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have updated the documentation accordingly.
  • This change requires a change to the documentation on the website.

@42atomys 42atomys self-requested a review August 22, 2024 13:04
@42atomys 42atomys added good first issue Good for newcomers priority/low 🟩 Priority 4 - Low priority and doesn't need to be rushed state/todo 🚀 This is confirmed, will work on soon domain/obvious 🟩 Represents the "known knowns" issue. It's Obviously type/feature ⭐ Addition of new feature aspect/dex 🤖 Concerns developers' experience with the codebase labels Aug 22, 2024
@42atomys
Copy link
Member

Hello @mbezhanov,

Thank you for your first contribution to Sprout! 🌱 💜

I’ve made a few changes:

  • Not relevant changes: Reordered functions in the file, added tests and examples.
  • Relevant change: To align with Go template conventions, I swapped the src and name arguments to allow writing with a pipe.

For example:

{{ .struct | hasField "boo" }}

Your proposals have been accepted and will be merged soon. You can start using them with the main branch; the functions will be included in the next release 🎉

Signed-off-by: Atomys <contact@atomys.fr>
@42atomys 42atomys merged commit 44ae526 into go-sprout:main Aug 22, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aspect/dex 🤖 Concerns developers' experience with the codebase domain/obvious 🟩 Represents the "known knowns" issue. It's Obviously good first issue Good for newcomers priority/low 🟩 Priority 4 - Low priority and doesn't need to be rushed state/todo 🚀 This is confirmed, will work on soon type/feature ⭐ Addition of new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

proposal: hasField function for use with structs
2 participants