If this extension is missing something that you needs, feel free to fork this repository and customize this extension to suit your usages.
If you also want to merge that change into this repository, please update the file below and open a pull request.
- Update the
README.md
file if needed. - No need to bump the extension version or edit the release note. Those will be done before merging into
main
branch. - Open a pull request into
develop
branch.
For changes like adding case formats, you can follow the guide here.
But feel free to make other changes / add other features as you like.
- Add the new case name in
constant.ts
andtypes.ts
- Create a new function in
formatter.ts
function formatNewCaseType(field: string): string
- This function receive a field name and return formatted version
- There is
splitWords()
function that you can use- This function splits Go struct field name into an array of words
- Add the new case name in
formatField()
's switch case and call your new function
- Generate command should also support the placeholder for the new case after the changes above
- You can test it by using
{{NEW_CASE_NAME}}
placeholder in the command config
- You can test it by using
Main logic files
src/extension.ts
— extension's acivation and deactivation logic- Feature logic files
src/tagSuggestion.ts
— tag suggestion logicsrc/valueSuggestion.ts
— tag value suggestion logicsrc/generation.ts
— tag generation command logic
Config & util files
src/formatter.ts
— field name formatter helper function logicsrc/config.ts
— extension config servicesrc/types.ts
src/constant.ts
VSCode extension config file