protoc-gen-gotag
protoc-gen-gotag copied to clipboard
Can I choose the fields that was auto generated?
I have a message like this. I want to generate the custom for the 'operator' and 'article_id' , but I do not want to generate for the app_token because it is Sensitive Data. And I am too lazy to define every tag's name. I want to use the auto funtion to generate the camel as name except the filed 'app_token'. Can we support the auto generate for this message? for the filed that I define the tag, auto generate using the camel. For the other fileds, just ignore.
message UpdateArticleAuthReq{
string app_token = 1;
string operator = 2 [(tagger.tags) = "jsonlog"];
int64 article_id = 3 [(tagger.tags) = "jsonlog"];
}
Is this issue still relevant? Me, @ucpr and @mesmerx are embracing the project and planning both maintenance and evolution, so we would like to tidy up everything before working on new features. If the issue is not relevant anymore or we don't get a response in a few days, it will be closed, until we are ready to work on it.
Is this issue still relevant? Me, @ucpr and @mesmerx are embracing the project and planning both maintenance and evolution, so we would like to tidy up everything before working on new features. If the issue is not relevant anymore or we don't get a response in a few days, it will be closed, until we are ready to work on it.
YES!!! I am waiting this feature
i dont get exatcly what you want, if you want to ignore the tag you can add the - to the json tags maybe even using https://github.com/srikrsna/protoc-gen-gotag?tab=readme-ov-file#add-tags-to-xxx-fields if you want to add the snake/camel to any tag you can use https://github.com/srikrsna/protoc-gen-gotag?tab=readme-ov-file#auto-add-tags-on-field
but if you want to APPEND a tag to the created ones, i afraid its not possible AFAIK, not without a huge rework (that we are planning to do) if you give details maybe i can create a code to handle this with some workaround for you
i dont get exatcly what you want, if you want to ignore the tag you can add the - to the json tags maybe even using https://github.com/srikrsna/protoc-gen-gotag?tab=readme-ov-file#add-tags-to-xxx-fields if you want to add the snake/camel to any tag you can use https://github.com/srikrsna/protoc-gen-gotag?tab=readme-ov-file#auto-add-tags-on-field
but if you want to APPEND a tag to the created ones, i afraid its not possible AFAIK, not without a huge rework (that we are planning to do) if you give details maybe i can create a code to handle this with some workaround for you
The function I want is a little like the "auto-add-tags-on-field" feature. But "auto-add-tags-on-field" will add tags on all fields。I want it just add tag on the field that I marked. Just like a field white list。The fields in white list will be added tags automatically, others not.
this feature right now its not possible if i understand correctly, you need to manually add the tags control that, but in future we will have a plan for that its ok so we can close as we gonna plan this ?
this feature right now its not possible if i understand correctly, you need to manually add the tags control that, but in future we will have a plan for that its ok so we can close as we gonna plan this ?
OK. Thank you!