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

Feature to auto add custom tag options to generated go structs #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PramodChaitanyakvv
Copy link

@PramodChaitanyakvv PramodChaitanyakvv commented Aug 14, 2023

The following command will auto add provided custom tag options to generated go structs

protoc -I /usr/local/include \
    	-I . \
    	--gotag_out=auto="form-as-camel":. --gotag_opt=suffix="form:optional+required" example/example.proto
  

Generated Go struct
  
type Foo struct {
	Id   string `form:"id,optional,required"`
	Name string `form:"name,optional,required"`
	Age  int    `form:"age,optional,required"`
}

resolution for the following issue #41 (comment)

@PramodChaitanyakvv PramodChaitanyakvv changed the title Feature to auto add custom tag options Feature to auto add custom tag options to generated go structs Aug 14, 2023
@mesmerx
Copy link
Collaborator

mesmerx commented Jun 1, 2024

@Kavuti @ucpr this could be a good to add, lets test 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
Development

Successfully merging this pull request may close these issues.

2 participants