jennifer icon indicating copy to clipboard operation
jennifer copied to clipboard

Line comments are printed mid-line

Open dave opened this issue 5 years ago • 0 comments

Thanks to @magicsong for reporting this in https://github.com/dave/jennifer/issues/49:

Values(DictFunc) cannot add comment of each field like following:

opt := &LoginOption {
Login : "MUST_EDIT_IT", // [TODO] This field is REQUIRED
Password : "MUST_EDIT_IT", // [TODO] This field is REQUIRED
}

Line comments are inserted in the output where the Comment function is executed. Perhaps there should be a buffer of line comments that only gets written when we get to a \n?

dave avatar Nov 13 '18 06:11 dave