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

@goTag do not override existing tag #2514

Closed
valllabh opened this issue Jan 22, 2023 · 1 comment · Fixed by #2533
Closed

@goTag do not override existing tag #2514

valllabh opened this issue Jan 22, 2023 · 1 comment · Fixed by #2533

Comments

@valllabh
Copy link
Contributor

valllabh commented Jan 22, 2023

@goTag do not override existing tag

Ideally it should override existing tag. sole purpose of the directive is to give control to user.
Looks

image

image

GoTagFieldHook just appends new tags

f.Tag = f.Tag + " " + strings.Join(args, " ")

@valllabh valllabh changed the title @goTag does not override existing tag @goTag do not override existing tag Jan 25, 2023
StevenACoffman added a commit that referenced this issue Jan 27, 2023
…struct tags per #2514 (#2533)

* removeDuplicateTags func introduced to fix #2514

* Change to prepend goTag directive

Signed-off-by: Steve Coffman <steve@khanacademy.org>

* Fix test for field_hooks_are_applied to prepend

Signed-off-by: Steve Coffman <steve@khanacademy.org>

---------

Signed-off-by: Steve Coffman <steve@khanacademy.org>
Co-authored-by: vallabh <vallabh.joshi@gmail.com>
@StevenACoffman
Copy link
Collaborator

Thanks for reporting this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants