-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Godoc comments #53
Comments
Thank you for your useful input. That's certainly a valid issue and I hope to start working towards addressing all the things you mentioned. :) |
To make a proper documentation one needs to understand what kind of audience it is supposed to address. I am always happy to provide support to anyone who is trying to understand how all this code works inside, assuming he has some basic knowledge about bitcoin in general and just tries to understand this specific implementation. I believe at the current stage of matter, it is just more efficient for me to answer specific questions, rather then write a technical documentation that will try to address everything. When I get enough of certain type of questions, then I will know which parts of the code/solution are worth documenting. So please forgive me a lack of the documentation at this stage of the project, but also know that a legit questions about how to use this code are always welcome and they are actually useful for me, as they give me an indication of what is worth documenting. Just send any questions you have to [email protected] or to my Telegram messenger @piotrn |
First of all: Amazing effort to write an independent Bitcoin implementation as an (as it seems) single contributor.
I stumbled upon this thanks to this Tweet, which points to the same author's blog article comparing different Bitcoin node implementations' performance.
I wanted to take a dive into the code, but realized that in many/most packages, for example
github.com/piotrnar/gocoin/lib/btc
, most exported types and functions don't have any Godoc comment. Some types/functions have comments, but don't adhere to the Godoc format (like beginning with the name of the type/function, as mentioned in this Go Blog article).See the Godoc of that package here: https://godoc.org/github.com/piotrnar/gocoin/lib/btc
Examples of well documented packages:
Proper Godoc comments might be helpful for
To not export some packages at all you could use an
internal
directory, as explained in the Go 1.4 release notes.As a side note, the recently announced official https://go.dev website, which offers an updated / extended version of Godoc, for example to support versioned Go modules, seems to not be able to understand your LICENSE and thus thinks it's not allowed to show your Godoc at all. See https://pkg.go.dev/github.com/piotrnar/gocoin/lib/btc?tab=doc.
The text was updated successfully, but these errors were encountered: