Why do Go programmers put the name of the function as the first word of the function comment? This is a technical question please not a religious one.
As an example
// addOptions adds options s to opt
func addOptions(s string, opt interface{}) (string, error) {
....
Dose this not violate the SPOT (Single Point Of Truth) principle?
I am asking because I am sure there is a very good reason.
That is how it is done in 'The GO Programming Language' (Alan A. A. Donovan and Brian W. Kernighan). Also it was done like that in 'The C Programming Language' (Dennis M. Ritchie and Brian W. Kernighan) back in 1988. If it has lasted this long it seems there must be a good reason?
The SPOT principle is attributed to Kernighan by Eric S. Raymond in 'The Art of UNIX Programming'.