How can I get the func description within go code?
// My very nice description
func myFunc() { ... }
I'd like to have My very nice description
.
Getting the name of a func is pretty straight forward:
runtime.FuncForPC(reflect.ValueOf(myFunc).Pointer()).Name()
Is there something similar for the documentation? It would be ok for me to parse the original go file. Any shortcuts there?