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

(SCC-S1000) Use plain channel send or receive #3

Open
chunshengster opened this issue Feb 23, 2021 · 0 comments
Open

(SCC-S1000) Use plain channel send or receive #3

chunshengster opened this issue Feb 23, 2021 · 0 comments
Assignees

Comments

@chunshengster
Copy link
Owner

Description

Select statements with a single case can be replaced with a simple send or receive. If you intend to handle the case when there is no value received from channel, add a default case to make the select statement non-blocking. Bad pattern: ```go select { case x := <-ch: fmt.Println(x) …

Occurrences

There is 1 occurrence of this issue in the repository.

See all occurrences on DeepSource → deepsource.io/gh/chunshengster/go-eventpublisherfunk/issue/SCC-S1000/occurrences/

@chunshengster chunshengster self-assigned this Feb 23, 2021
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

No branches or pull requests

1 participant