Open f0rt opened 2 years ago
Do you have a business driver that forces you to extract function-parameter comments?
Yes, I'm using the annotations to generate a CLI. I'm copying comments to the CLI parameter comments.
Could you re-apply your proposed change?
Apologies from my side. I should have given this feedback when you offered your PR
Hey team, I'm using
annotationParser.ParseSourceDir()
to parse a file into a model. I've noticed that function argument comments (model.Field.DocLines
andmodel.Field.CommentsLines
) are always empty. I've done some debugging and saw thatast
model function argument comments are empty too. This is a known issue: https://github.com/golang/go/issues/35484 They suggest usingast.NewCommentMap()
to load the function argument comments: https://go.dev/play/p/zDcLxXqTk0 Thanks!