johnsonjh / gfcptun

gfcptun: A fast and low-latency tunnel using GFCP over UDP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

(SCC-S1000) Use plain channel send or receive

johnsonjh opened this issue · comments

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/johnsonjh/gfcptun/issue/SCC-S1000/occurrences/

⚠️ This has been marked to be closed in 7 days.