Golang Can Remove Code From the Binary, and You May Want to Know That! | HackerNoon
Briefly

The article discusses the development of a Go linter called 'govanish', which effectively identifies potential bugs by leveraging the Go compiler's optimizations. One intriguing discovery during its creation was the behavior of Go interfaces with nil values, revealing that a nil interface can be unequal to another with a non-nil type. This unique approach has successfully found issues in various open-source projects, underscoring the importance of understanding Go's language mechanics. The linter aims to assist developers by ensuring that no code is unintentionally omitted from binaries.
The dual components of Go interfaces affect equality checks, particularly with nil values, highlighting a subtlety in the language's handling of types and interfaces.
The development of the linter drew inspiration from exploring Go's nuances, particularly how interfaces interact with nil values, leading to the discovery of hidden bugs.
Read at Hackernoon
[
|
]