Golang
Go: Directional Channel Types
Golang’s concurrency features are super easy to understand and use. One of the key features is a channel, used to share data across different goroutines (think of this as a lightweight user-space pthread).
You have built a system on go that is super performant and web scale. One day, you push a change and now your service is crash-looping. You check the logs, and you realize that one of your goroutines sent on a closed channel, and your program panicked.
What should I name my go mod?
When I do go mod init, what should I init my module as? It seems like convention is to set the go mod name to the page of your repo in GitHub. But why?
Looking at the gomod docs:
The module path must uniquely identify your module. For most modules, the path is a URL where the
gocommand can find the code (or a redirect to the code). For modules that won’t ever be downloaded directly, the module path can be just some name you control that will ensure uniqueness. The prefixexample/is also reserved for use in examples like these.