comment conversion script? inlncmt.awk?

53 views
Skip to first unread message

quin...@gmail.com

unread,
Oct 2, 2020, 4:05:07 AM10/2/20
to golang-nuts
Hi,

When I was writing C I used to use a script bcmt.awk (it might have been one of russ's or erikQ's, I cannot remember) to convert c++ style comments to K&R syle. Now I am a proud go programmer I find my fingers still want to put starts before and after my slashes when writing comments.

Has anyone written inlncmt.awk or similar to help me fix my poor style? Though this may sound simple it needs care to deal with /* and */ in strings and multiline comments nicely. This is why I ask.

Thanks,

-Steve

Shulhan

unread,
Oct 2, 2020, 7:02:11 AM10/2/20
to quin...@gmail.com, golang-nuts
I am not familiar with inlncmt.awk, did you mean a tools to convert from "/**/" to "//" ?
If yes, I have gofmtcomment [1].

[1] https://pkg.go.dev/github.com/shuLhan/share/cmd/gofmtcomment

quin...@gmail.com

unread,
Oct 2, 2020, 11:15:27 AM10/2/20
to golang-nuts

inlncmt.awk was my joke-ey guess at what such a thing might be called,
but gofmtcomment sounds just like what I want.

Many thanks,

-Steve
Reply all
Reply to author
Forward
0 new messages