Recently a performance issue is located as unimplemented interface causing incorrect boolean result. The interface was introduced 5 years ago and the break change was introduced 1 year later.
Such subtle issue can hardly be found without defensive programming practice, which includes code style. Thus I’d like to start a discussion about the Golang Code Style among TiDB Projects; of course, for its Go projects such as tidb, parser, br, dm, ticdc, and so on.
Here is Uber Go Style Guide that could be a reference. But I think we should collect best practices and pain points from our developers, and the join force constructs our own guide.
Looking forward to your experience and suggestion.