amazon-ion / ion-cli

Apache License 2.0
34 stars 15 forks source link

Command traits #56

Closed zslayton closed 1 year ago

zslayton commented 1 year ago

This PR introduces two traits:

  1. IonCliCommand, which captures functionality common to all commands/namespaces.
  2. WithIonCliArgument, which adds extension methods to clap's Command type, making it much easier for commands to use the same flag configurations as other commands.

This eliminates a large amount of the copy/pasting that was proliferating across subcommands.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.