3 ms·
What I like the most about go is that it has a unified way to write both unit tests and examples, which get integrated in the autogenerated documentation. Extr
by cookiengineer 2y ago
What I like the most about go is that it has a unified way to write both unit tests and examples, which get integrated in the autogenerated documentation.
Extra quirks and edge cases are just comments in the implementation code.
In my opinion that's exactly how it should be. The documentation should be as close to the codebase as possible to avoid redundancies and an out of date documentation.
Only the go documentation proxies are a little messed up, see sourcehut blog posts about it. But the huge advantage is that you can selfhost them and create your own automated documentation base for your company, for example.
[1] https://github.com/golang/pkgsite https://github.com/golang/pkgsite