Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gofumpt removes multiple tag_name:"..." tags, only first is left #312

Open
sk-lemken opened this issue Sep 16, 2024 · 0 comments
Open

gofumpt removes multiple tag_name:"..." tags, only first is left #312

sk-lemken opened this issue Sep 16, 2024 · 0 comments

Comments

@sk-lemken
Copy link

In my application I'm using the flags package.
It has the possiblity to specify the allowed values for a paramter via choice:"..." in the struct tags.

The issue here is, when multiple tags with the same name exist, all but the first are removed.

Expected:

Format is done but tags are left in place.

type CLI struct {
    ParamLevel string `short:"L" long:"level" choice:"info" choice:"warn" choice:"error" ... description:"..."
}

Actual

type CLI struct {
    ParamLevel string `short:"L" long:"level" choice:"info" ... description:"..."
}

Format is done but same name tags are removed and only first occurence is left.

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

No branches or pull requests

1 participant