Go has a protocol for putting documentation into comment headers above functions and symbols, and when you jump to the code you can actually see the implementation itself, if the documentation is a bit weak, you can usually make some sense of it by reading what it does
documentation is never done properly when it is too much extra work... there is a saying, something like "lies, damned lies, and documentation" they are the most vulnerable to bitrot of any part of the process of software development... very often you make some effort to write it, and then you debug it, fix bugs, which forces you to change the algorithm fundamentally, and then the documentation is wrong, but you forget to fix that because it doesn't affect the results of the tests