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

Remove tags with the same key #109

Open
khaitranhq opened this issue Sep 20, 2023 · 0 comments
Open

Remove tags with the same key #109

khaitranhq opened this issue Sep 20, 2023 · 0 comments

Comments

@khaitranhq
Copy link

Hi. I am working with go-flag which uses tags of structs to work. Some of them can be repeated with the same key. However, when I used golines to format, it left only one tag and removed others.

Reproduce

Source code

package main

type TestType struct {
	Arg string `choice:"ab" choice:"b"`
}

func main() {}

And run command

golines ./main.go

Output

package main

type TestType struct {
        Arg string `choice:"ab"`
}

func main() {}

Format with gofmt

package main

type TestType struct {
	Arg string `choice:"ab" choice:"b"`
}

func main() {}
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