devops-rob / target-cli

A CLI tool to manage context profiles for HashiCorp tools
Apache License 2.0
32 stars 5 forks source link

Inconsistent (mostly internal) and external naming #19

Open picatz opened 9 months ago

picatz commented 9 months ago

This is more of a small nit I noticed while working on #18, some of the product config structs don't share the same naming, or generally lack consistency:

For example, in Vault and Bounary, there's a Key:

https://github.com/devops-rob/target-cli/blob/7a10f70ca7b6f6da387f82a00136414b66ff0ba4/cmd/root.go#L64

https://github.com/devops-rob/target-cli/blob/7a10f70ca7b6f6da387f82a00136414b66ff0ba4/cmd/root.go#L41

But, for Nomad and Consul there's a NomadKey and ConsulKey:

https://github.com/devops-rob/target-cli/blob/7a10f70ca7b6f6da387f82a00136414b66ff0ba4/cmd/root.go#L107

https://github.com/devops-rob/target-cli/blob/7a10f70ca7b6f6da387f82a00136414b66ff0ba4/cmd/root.go#L95


Or, in Bounary there's TlsInsecure (better name):

https://github.com/devops-rob/target-cli/blob/7a10f70ca7b6f6da387f82a00136414b66ff0ba4/cmd/root.go#L42

But, In Vault there's a SkipVerify (doing the same thing, with a different, and less ideal name):

https://github.com/devops-rob/target-cli/blob/7a10f70ca7b6f6da387f82a00136414b66ff0ba4/cmd/root.go#L67

Then there's the issue that Consul and Nomad have no equivalent exposed here, and that it would probably make sense for these to be booleans instead of string values.