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

Make structifyStream() channel types more explicit, e.g. input only #797

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Al2Klimov
Copy link
Member

No description provided.

@cla-bot cla-bot bot added the cla/signed label Sep 4, 2024
@Al2Klimov Al2Klimov requested a review from oxzi September 6, 2024 07:39
@yhabteab
Copy link
Member

yhabteab commented Sep 6, 2024

I don't understand what this change is supposed to achieve! Previously, nil channels were initialised and immediately closed, and with PR nil channels are assigned to a new closed one. So, which issue is this supposed to fix?

@julianbrost
Copy link
Contributor

I don't understand what this change is supposed to achieve!

Makes it more clear in the function signature, which channels are used for input and which for output.

Previously, nil channels were initialised and immediately closed, and with PR nil channels are assigned to a new closed one. So, which issue is this supposed to fix?

That probably became necessary as otherwise, once you assign a channel to upserted <-chan database.Entity for example, you can no longer close it using that <-chan reference. Therefore, it's assigned to a temporary variable, closed, then assigned to the final variable that no longer allows closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants