News for hackers. Stuff that matters.
Re:Ask HN: What are the “best” codebases that you've encount... by PhilippGille on Monday July 29, 2019 @02:51PM (#20557990)
In Go, a folder is a package and as soon as you write a comment before the `package foo` declaration, it's package documentation. And thus GoDoc automatically generates a nice webpage out of it.

See for example this package comment: https://github.com/golang/go/blob/master/src/net/http/doc.go...

Turns into this documentation (the beginning only): https://godoc.org/net/http

Out of the box.

Re:Ask HN: What are the “best” codebases that you've encount... by omarhaneef on Monday July 29, 2019 @03:04PM (#20558145)
Nice. I like the way it also shows you the functions inside a file/folder, and that clickable index is nice.
Re:Ask HN: What are the “best” codebases that you've encount... by heyoni on Monday July 29, 2019 @05:37PM (#20559717)
What's the point of all these empty comments throughout the code?

    // ...
Re:Ask HN: What are the “best” codebases that you've encount... by patrickmcnamara on Monday July 29, 2019 @08:29PM (#20560976)
It's just an ellipsis indicating that there be would more code after.
Re:Ask HN: What are the “best” codebases that you've encount... by hazz99 on Monday July 29, 2019 @08:12PM (#20560873)
It's likely the Go libter requiring every public method / variable to be documented.
Re:Ask HN: What are the “best” codebases that you've encount... by inlined on Tuesday July 30, 2019 @04:00AM (#20562919)
Yup. I saw a lot of codebases with things like:

// EnqueueEvent ...

func (q *Queue)EnqueueEvent(event Event)