Skip to content

Conversation

@fnoopv
Copy link

@fnoopv fnoopv commented Oct 28, 2025

fix #297

As discussed previously, the --comments flag has been added. If the user uses this flag, a _{{.enum.Name}}Comments variable and a {{.enum.Name}}Comment(name string) string method will be generated. If you think there are any issues with the naming or implementation, please comment or make changes directly.

@fnoopv fnoopv requested a review from abice as a code owner October 28, 2025 06:59
Copy link
Owner

@abice abice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add an example that uses this functionality so that it's easier to see what is being generated, and to ensure that it works.

--forcelower Forces a camel cased comment to generate lowercased names. (default: false)
--forceupper Forces a camel cased comment to generate uppercased names. (default: false)
--nocomments Removes auto generated comments. If you add your own comments, these will still be created. (default: false)
--comments If you add your own comments, a method for getting comments will be added. (default: false)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if "Comments" is the right term here. We are using the comments from the enum declaration, but the way we are returning them, it's more along the lines of Description correct?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--descriptions ?

Co-authored-by: Alex Bice <alex.bice@gmail.com>
Signed-off-by: fnoopv <fnoopv@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add functionality to get enum array and description

2 participants