diff --git a/commands/bosh.go b/commands/bosh.go index 6add35f..ab9b0f9 100644 --- a/commands/bosh.go +++ b/commands/bosh.go @@ -12,7 +12,7 @@ package commands type BoshCommand struct { TargetConfig string `short:"t" long:"target" env:"HAMMER_TARGET_CONFIG" hidden:"true"` - EnvironmentName string `short:"e" long:"environmentName" env:"HAMMER_ENVIRONMENT_NAME" hidden:"true"` + EnvironmentName string `short:"e" long:"environment-name" env:"HAMMER_ENVIRONMENT_NAME" hidden:"true"` File bool `short:"f" long:"file" description:"write a script file but do not run it"` Env EnvReader diff --git a/commands/cf_login.go b/commands/cf_login.go index cc12d89..3668a9a 100644 --- a/commands/cf_login.go +++ b/commands/cf_login.go @@ -16,7 +16,7 @@ import ( type CFLoginCommand struct { TargetConfig string `short:"t" long:"target" env:"HAMMER_TARGET_CONFIG" hidden:"true"` - EnvironmentName string `short:"e" long:"environmentName" env:"HAMMER_ENVIRONMENT_NAME" hidden:"true"` + EnvironmentName string `short:"e" long:"environment-name" env:"HAMMER_ENVIRONMENT_NAME" hidden:"true"` File bool `short:"f" long:"file" description:"write a script file but do not run it"` Env EnvReader diff --git a/commands/om.go b/commands/om.go index 7735cd5..b97f814 100644 --- a/commands/om.go +++ b/commands/om.go @@ -12,7 +12,7 @@ package commands type OMCommand struct { TargetConfig string `short:"t" long:"target" env:"HAMMER_TARGET_CONFIG" hidden:"true"` - EnvironmentName string `short:"e" long:"environmentName" env:"HAMMER_ENVIRONMENT_NAME" hidden:"true"` + EnvironmentName string `short:"e" long:"environment-name" env:"HAMMER_ENVIRONMENT_NAME" hidden:"true"` File bool `short:"f" long:"file" description:"write a script file but do not run it"` Env EnvReader diff --git a/commands/open.go b/commands/open.go index c638869..c7c05d4 100644 --- a/commands/open.go +++ b/commands/open.go @@ -16,7 +16,7 @@ import ( type OpenCommand struct { TargetConfig string `short:"t" long:"target" env:"HAMMER_TARGET_CONFIG" hidden:"true"` - EnvironmentName string `short:"e" long:"environmentName" env:"HAMMER_ENVIRONMENT_NAME" hidden:"true"` + EnvironmentName string `short:"e" long:"environment-name" env:"HAMMER_ENVIRONMENT_NAME" hidden:"true"` File bool `short:"f" long:"file" description:"write a script file but do not run it"` Show bool `short:"s" long:"show" description:"only show the credentials"` diff --git a/commands/pks_login.go b/commands/pks_login.go index a9c8857..72b8582 100644 --- a/commands/pks_login.go +++ b/commands/pks_login.go @@ -16,7 +16,7 @@ import ( type PKSLoginCommand struct { TargetConfig string `short:"t" long:"target" env:"HAMMER_TARGET_CONFIG" hidden:"true"` - EnvironmentName string `short:"e" long:"environmentName" env:"HAMMER_ENVIRONMENT_NAME" hidden:"true"` + EnvironmentName string `short:"e" long:"environment-name" env:"HAMMER_ENVIRONMENT_NAME" hidden:"true"` File bool `short:"f" long:"file" description:"write a script file but do not run it"` Env EnvReader diff --git a/commands/ssh.go b/commands/ssh.go index 8391793..926e3a9 100644 --- a/commands/ssh.go +++ b/commands/ssh.go @@ -33,14 +33,14 @@ func (e *environmentName) UnmarshalFlag(name string) error { type SSHCommand struct { TargetConfig targetConfigPath `short:"t" long:"target" env:"HAMMER_TARGET_CONFIG" hidden:"true"` - EnvironmentName environmentName `short:"e" long:"environmentName" env:"HAMMER_ENVIRONMENT_NAME" hidden:"true"` + EnvironmentName environmentName `short:"e" long:"environment-name" env:"HAMMER_ENVIRONMENT_NAME" hidden:"true"` Director SSHDirectorCommand `command:"director"` OpsManager SSHOpsManagerCommand `command:"opsman"` } type SSHDirectorCommand struct { TargetConfig string `short:"t" long:"target" env:"HAMMER_TARGET_CONFIG" hidden:"true"` - EnvironmentName string `short:"e" long:"environmentName" env:"HAMMER_ENVIRONMENT_NAME" hidden:"true"` + EnvironmentName string `short:"e" long:"environment-name" env:"HAMMER_ENVIRONMENT_NAME" hidden:"true"` File bool `short:"f" long:"file" description:"write a script file but do not run it"` Env EnvReader @@ -61,7 +61,7 @@ func (c *SSHDirectorCommand) Execute(args []string) error { type SSHOpsManagerCommand struct { TargetConfig string `short:"t" long:"target" env:"HAMMER_TARGET_CONFIG" hidden:"true"` - EnvironmentName string `short:"e" long:"environmentName" env:"HAMMER_ENVIRONMENT_NAME" hidden:"true"` + EnvironmentName string `short:"e" long:"environment-name" env:"HAMMER_ENVIRONMENT_NAME" hidden:"true"` File bool `short:"f" long:"file" description:"write a script file but do not run it"` Env EnvReader diff --git a/commands/sshuttle.go b/commands/sshuttle.go index 2748d74..3b0e8f1 100644 --- a/commands/sshuttle.go +++ b/commands/sshuttle.go @@ -12,7 +12,7 @@ package commands type SshuttleCommand struct { TargetConfig string `short:"t" long:"target" env:"HAMMER_TARGET_CONFIG" hidden:"true"` - EnvironmentName string `short:"e" long:"environmentName" env:"HAMMER_ENVIRONMENT_NAME" hidden:"true"` + EnvironmentName string `short:"e" long:"environment-name" env:"HAMMER_ENVIRONMENT_NAME" hidden:"true"` File bool `short:"f" long:"file" description:"write a script file but do not run it"` Env EnvReader diff --git a/integration/base_command_test.go b/integration/base_command_test.go index 6456620..c0910d7 100644 --- a/integration/base_command_test.go +++ b/integration/base_command_test.go @@ -32,10 +32,10 @@ var _ = Describe("CLI", func() { Say(`Usage:`), Say(`hammer \[OPTIONS\] `), Say(`Application Options:`), - Say(`-t, --target= path to the target environment config`), - Say(`-e, --environmentName= name of the environment in the config to target`), + Say(`-t, --target= path to the target environment config`), + Say(`-e, --environment-name= name of the environment in the config to target`), Say(`Help Options:`), - Say(`-h, --help Show this help message`), + Say(`-h, --help Show this help message`), Say(`Available commands:`), Say(`bosh display BOSH credentials, or run a BOSH command`), Say(`cf-login log in to the cf for the environment`), @@ -61,10 +61,10 @@ var _ = Describe("CLI", func() { Say(`Usage:`), Say(`hammer \[OPTIONS\] `), Say(`Application Options:`), - Say(`-t, --target= path to the target environment config`), - Say(`-e, --environmentName= name of the environment in the config to target`), + Say(`-t, --target= path to the target environment config`), + Say(`-e, --environment-name= name of the environment in the config to target`), Say(`Help Options:`), - Say(`-h, --help Show this help message`), + Say(`-h, --help Show this help message`), Say(`Available commands:`), Say(`bosh display BOSH credentials, or run a BOSH command`), Say(`cf-login log in to the cf for the environment`), diff --git a/main.go b/main.go index 4307f32..196e86d 100644 --- a/main.go +++ b/main.go @@ -76,7 +76,7 @@ type options struct { Version versionCommand `command:"version" alias:"ver" description:"version of command"` Completion commands.CompletionCommand `command:"completion" description:"command completion script"` TargetConfig targetConfigPath `short:"t" long:"target" env:"HAMMER_TARGET_CONFIG" description:"path to the target environment config"` - EnvironmentName environmentName `short:"e" long:"environmentName" env:"HAMMER_ENVIRONMENT_NAME" description:"name of the environment in the config to target"` + EnvironmentName environmentName `short:"e" long:"environment-name" env:"HAMMER_ENVIRONMENT_NAME" description:"name of the environment in the config to target"` } func main() {