edgedb / edgedb-go

The official Go client library for EdgeDB
https://pkg.go.dev/github.com/edgedb/edgedb-go
Apache License 2.0
167 stars 11 forks source link

Fix #287: Adds -pubtypes, -pubfuncs, and -jsontag CLI flags #313

Open chirino opened 2 months ago

chirino commented 2 months ago
fmoor commented 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.

chirino commented 3 weeks ago

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.