Khan / genqlient

a truly type-safe Go GraphQL client
MIT License
1.02k stars 99 forks source link

Version subcommand #296

Open kevinmichaelchen opened 9 months ago

kevinmichaelchen commented 9 months ago

This is definitely a nice-to-have.

I'm packaging up the genqlient CLI as part of Tea.

See PR here: https://github.com/teaxyz/pantry/pull/3318

A version subcommand would be nice for end users.

I can try to make a PR for this at some point if it's cool.

https://github.com/alexflint/go-arg#subcommands

benjaminjkraft commented 9 months ago

This seems fine (I think we can just return what debug.BuildInfo says, we already have an init subcommand so it should be easy to add version alongside) -- but does it work for you to do go version $(which genqlient) or similar? That will give you the same data with less work :-) .