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

Bind consumed message to different types. #670

Conversation

illenko
Copy link
Contributor

@illenko illenko commented May 29, 2024

Description:

  • Bind consumed message to different types: struct, map[string]any, int, bool, float64 and string.

  • Check parameter passed to Bind is pointer.

  • Closes: Bind Pub/Sub messages to basic data types. #662

  • I have formatted my code using goimport and golangci-lint.

  • All new code is covered by unit tests.

  • This PR does not decrease the overall code coverage.

  • I have reviewed the code comments and documentation for clarity.

aryanmehrotra
aryanmehrotra previously approved these changes May 30, 2024
Umang01-hash
Umang01-hash previously approved these changes May 31, 2024
@vipul-rawat
Copy link
Member

@illenko should we not support all built in types like int64, int32, uint, etc. I think int64 is a much used type in applications.

@illenko
Copy link
Contributor Author

illenko commented May 31, 2024

@illenko should we not support all built in types like int64, int32, uint, etc. I think int64 is a much used type in applications.

@vipul-rawat As for the difference between int and int64, this is architecture-dependent. int is simply an alias for either a 32-bit or 64-bit integer, depending on the architecture you are compiling for.

I can add this support, but I do not think it will have a real usage.

@vipul-rawat
Copy link
Member

@illenko sure we can have the current ones then, if requirement comes we can add other data types further.

@illenko illenko dismissed stale reviews from Umang01-hash and aryanmehrotra via 384d0d3 June 1, 2024 05:22
@vipul-rawat vipul-rawat merged commit 75993c3 into gofr-dev:development Jun 3, 2024
11 checks passed
@vipul-rawat vipul-rawat mentioned this pull request Jun 5, 2024
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.

Bind Pub/Sub messages to basic data types.
5 participants