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

Add Struct Tags: More transform variants #906

Closed
skaldesh opened this issue Nov 11, 2020 · 4 comments
Closed

Add Struct Tags: More transform variants #906

skaldesh opened this issue Nov 11, 2020 · 4 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@skaldesh
Copy link
Contributor

Is your feature request related to a problem? Please describe.
I want to use "kebabcase" in my project for my yaml:"my-property" tags.

Describe the solution you'd like
Add kebabcase (and other transforms maybe?)

Describe alternatives you've considered
None

Additional context
None

@hyangah
Copy link
Contributor

hyangah commented Nov 12, 2020

@skaldesh thanks for the report - we are using the gomodifytags tool for this feature, so we can support only the listed transformations here https://github.com/fatih/gomodifytags#transformations

Currently only snakecase/camelcase are settable through settings.json or settings UI. But you can still choose lispcase, pascalcase, or keep option by enabling promptForTags and supplying your choice for the transformation value.

"go.addTags": {
  "promptForTags": true
}

@hyangah hyangah added the NeedsFix The path to resolution is known, but the work has not been done. label Nov 12, 2020
@hyangah hyangah added this to the v0.19.0 milestone Nov 12, 2020
@skaldesh
Copy link
Contributor Author

Understood, the lispcase transformation is the one that I am personally looking for.
It should be an easy fix to simply allow all of these available transformations in the settings file/UI. I can try to do it, if you point me in the right direction (I have never contributed here before).

@hyangah
Copy link
Contributor

hyangah commented Nov 17, 2020

@skaldesh https://github.com/golang/vscode-go/blob/master/package.json#L1691-L1692

Can you please add all the currently supported transform list there? Thanks!
Our contribution guide is https://github.com/golang/vscode-go/blob/master/docs/contributing.md#setup but it's still sparse. Ping us in the gophers slack #vscode-dev channel if you have questions.

skaldesh added a commit to skaldesh/vscode-go that referenced this issue Nov 18, 2020
This simply allows in the settings.json or UI to use the missing 'lispcase', 'pascalcase' and 'keep'
transform options for the go.addTags command.

Fixes golang#906
skaldesh added a commit to skaldesh/vscode-go that referenced this issue Nov 18, 2020
This simply allows in the settings.json or UI to use the missing 'lispcase', 'pascalcase' and 'keep'
transform options for the go.addTags command.

Fixes golang#906
skaldesh added a commit to skaldesh/vscode-go that referenced this issue Nov 18, 2020
This simply allows in the settings.json or UI to use the missing 'lispcase', 'pascalcase' and 'keep'
transform options for the go.addTags command.

Fixes golang#906
skaldesh added a commit to skaldesh/vscode-go that referenced this issue Nov 18, 2020
This simply allows in the settings.json or UI to use the missing 'lispcase', 'pascalcase' and 'keep'
transform options for the go.addTags command.

fixes golang#906
@gopherbot
Copy link
Collaborator

Change https://golang.org/cl/271357 mentions this issue: package.json: add missing transform variants for go.addTags

@golang golang locked and limited conversation to collaborators Nov 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
3 participants