3 ms·
I wander why not start a comment text without a function name? i.e. "reads something" instead of "Read reads something". Can't GoDoc easily extract function nam
by zerr 13y ago
I wander why not start a comment text without a function name? i.e. "reads something" instead of "Read reads something". Can't GoDoc easily extract function names from the code?
- peeyek 13y agostarting comment with function name will much easier run `godoc` with `grep` command. $ godoc regexp | grep parse "If all the doc comments in the package began, "This function...", `grep` wouldn't help you remember the name. But because the package starts each doc comment with the name, you'd see something like this, which recalls the word you're looking for." Effective Go - http://golang.org/doc/effective_go.html#commentary http://golang.org/doc/effective_go.html#commentary