Open chirino opened 2 months ago
Awesome, thanks for this!
Would you add test cases for this? Copy the cmd/edgeql-go/testdata/no-args
directory and rename once for each of the new options. Adjust the directory content for the behavior with the option being tested. Then add a test case for each new directory here.
It would be great if the new options were added to the usage example in the docs.
I'm wondering if the -jsontag
should perhaps be more general. Maybe it could be -tags
and accept name+strategy pairs like json:snakecase
. This would allow adding multiple tags and being able to choose the name transformation strategy. I think it would be nice to split this into its own PR. I don't want the design discussion for this to hold up the other two options.
Feel free to make any changes you need. I thought I would send you this contribution to get you started. But I'm fine using a fork.
json:”...”
field tag