Skip to content

vdl: add the ability to specify go struct tags via the vdl.config file.#170

Merged
cosnicolaou merged 2 commits intomasterfrom
cos-add-struct-tags
Nov 9, 2020
Merged

vdl: add the ability to specify go struct tags via the vdl.config file.#170
cosnicolaou merged 2 commits intomasterfrom
cos-add-struct-tags

Conversation

@cosnicolaou
Copy link
Contributor

@cosnicolaou cosnicolaou commented Nov 9, 2020

This PR adds support for specifying go struct tags via the vdl.config file. The example below will add the tag json:"ja,omitempty" to TestStruct.A.

config = vdltool.Config{
        Go: {
                StructTags: map[string][]vdltool.GoStructTag{
                        "TestStruct": []vdltool.GoStructTag{
                                {Field: "A", Tag: `json:"ja,omitempty"`},
                        }
                },
        },
}

@cosnicolaou cosnicolaou merged commit d79ab5f into master Nov 9, 2020
@cosnicolaou cosnicolaou deleted the cos-add-struct-tags branch November 13, 2020 22:36
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

Successfully merging this pull request may close these issues.

1 participant