Skip to content

Commit

Permalink
changed camelcase for flags
Browse files Browse the repository at this point in the history
  • Loading branch information
jokestax committed Aug 5, 2024
1 parent 4254c0c commit 6e6a233
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 43 deletions.
8 changes: 4 additions & 4 deletions cmd/akamai/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ func Create() *cobra.Command {
createCmd.Flags().StringVar(&gitlabGroupFlag, "gitlab-group", "", "the GitLab group for the new gitops and metaphor projects - required if using gitlab")
createCmd.Flags().StringVar(&gitopsTemplateBranchFlag, "gitops-template-branch", "", "the branch to clone for the gitops-template repository")
createCmd.Flags().StringVar(&gitopsTemplateURLFlag, "gitops-template-url", "https://github.com/kubefirst/gitops-template.git", "the fully qualified url to the gitops-template repository to clone")
createCmd.Flags().StringVar(&gitopsRepoName, "gitopsRepoName", "gitops", "the custom gitops name")
createCmd.Flags().StringVar(&metaphorRepoName, "metaphorRepoName", "metaphor", "the custom metpahor name")
createCmd.Flags().StringVar(&adminTeamName, "adminTeamName", "admins", "admin team name for this repo ")
createCmd.Flags().StringVar(&developerTeamName, "developerTeamName", "developers", " developer team name for this repo")
createCmd.Flags().StringVar(&installCatalogApps, "install-catalog-apps", "", "comma seperated values to install after provision")
createCmd.Flags().StringVar(&gitopsRepoName, "gitops-repo-name", "gitops", "the custom gitops name")
createCmd.Flags().StringVar(&metaphorRepoName, "metaphor-repo-name", "metaphor", "the custom metaphor name")
createCmd.Flags().StringVar(&adminTeamName, "admin-team-name", "admins", "admin team name for this repo")
createCmd.Flags().StringVar(&developerTeamName, "developer-team-name", "developers", "developer team name for this repo")
createCmd.Flags().BoolVar(&useTelemetryFlag, "use-telemetry", true, "whether to emit telemetry")

return createCmd
Expand Down
8 changes: 4 additions & 4 deletions cmd/aws/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ func Create() *cobra.Command {
createCmd.Flags().StringVar(&gitlabGroupFlag, "gitlab-group", "", "the GitLab group for the new gitops and metaphor projects - required if using gitlab")
createCmd.Flags().StringVar(&gitopsTemplateBranchFlag, "gitops-template-branch", "", "the branch to clone for the gitops-template repository")
createCmd.Flags().StringVar(&gitopsTemplateURLFlag, "gitops-template-url", "https://github.com/kubefirst/gitops-template.git", "the fully qualified url to the gitops-template repository to clone")
createCmd.Flags().StringVar(&gitopsRepoName, "gitopsRepoName", "gitops", "the custom gitops name")
createCmd.Flags().StringVar(&metaphorRepoName, "metaphorRepoName", "metaphor", "the custom metpahor name")
createCmd.Flags().StringVar(&adminTeamName, "adminTeamName", "admins", "admin team name for this repo ")
createCmd.Flags().StringVar(&developerTeamName, "developerTeamName", "developers", " developer team name for this repo")
createCmd.Flags().StringVar(&installCatalogApps, "install-catalog-apps", "", "comma seperated values to install after provision")
createCmd.Flags().StringVar(&gitopsRepoName, "gitops-repo-name", "gitops", "the custom gitops name")
createCmd.Flags().StringVar(&metaphorRepoName, "metaphor-repo-name", "metaphor", "the custom metaphor name")
createCmd.Flags().StringVar(&adminTeamName, "admin-team-name", "admins", "admin team name for this repo")
createCmd.Flags().StringVar(&developerTeamName, "developer-team-name", "developers", "developer team name for this repo")
createCmd.Flags().BoolVar(&useTelemetryFlag, "use-telemetry", true, "whether to emit telemetry")
createCmd.Flags().BoolVar(&ecrFlag, "ecr", false, "whether or not to use ecr vs the git provider")
createCmd.Flags().BoolVar(&installKubefirstProFlag, "install-kubefirst-pro", true, "whether or not to install kubefirst pro")
Expand Down
8 changes: 4 additions & 4 deletions cmd/civo/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ func Create() *cobra.Command {
createCmd.Flags().StringVar(&subdomainNameFlag, "subdomain", "", "the subdomain to use for DNS records (Cloudflare)")
createCmd.Flags().StringVar(&domainNameFlag, "domain-name", "", "the Civo DNS Name to use for DNS records (i.e. your-domain.com|subdomain.your-domain.com) (required)")
createCmd.MarkFlagRequired("domain-name")
createCmd.Flags().StringVar(&gitopsRepoName, "gitopsRepoName", "gitops", "the custom gitops name")
createCmd.Flags().StringVar(&metaphorRepoName, "metaphorRepoName", "metaphor", "the custom metaphor name")
createCmd.Flags().StringVar(&adminTeamName, "adminTeamName", "admins", "admin team name for this repo")
createCmd.Flags().StringVar(&developerTeamName, "developerTeamName", "developers", "developer team name for this repo")
createCmd.Flags().StringVar(&gitopsRepoName, "gitops-repo-name", "gitops", "the custom gitops name")
createCmd.Flags().StringVar(&metaphorRepoName, "metaphor-repo-name", "metaphor", "the custom metaphor name")
createCmd.Flags().StringVar(&adminTeamName, "admin-team-name", "admins", "admin team name for this repo")
createCmd.Flags().StringVar(&developerTeamName, "developer-team-name", "developers", "developer team name for this repo")
createCmd.Flags().StringVar(&gitProviderFlag, "git-provider", "github", fmt.Sprintf("the git provider - one of: %s", supportedGitProviders))
createCmd.Flags().StringVar(&gitProtocolFlag, "git-protocol", "ssh", fmt.Sprintf("the git protocol - one of: %s", supportedGitProtocolOverride))
createCmd.Flags().StringVar(&githubOrgFlag, "github-org", "", "the GitHub organization for the new gitops and metaphor repositories - required if using github")
Expand Down
8 changes: 4 additions & 4 deletions cmd/digitalocean/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,11 @@ func Create() *cobra.Command {
createCmd.Flags().StringVar(&gitlabGroupFlag, "gitlab-group", "", "the GitLab group for the new gitops and metaphor projects - required if using gitlab")
createCmd.Flags().StringVar(&gitopsTemplateBranchFlag, "gitops-template-branch", "", "the branch to clone for the gitops-template repository")
createCmd.Flags().StringVar(&gitopsTemplateURLFlag, "gitops-template-url", "https://github.com/kubefirst/gitops-template.git", "the fully qualified url to the gitops-template repository to clone")
createCmd.Flags().StringVar(&gitopsRepoName, "gitopsRepoName", "gitops", "the custom gitops name")
createCmd.Flags().StringVar(&metaphorRepoName, "metaphorRepoName", "metaphor", "the custom metpahor name")
createCmd.Flags().StringVar(&adminTeamName, "adminTeamName", "admins", "admin team name for this repo ")
createCmd.Flags().StringVar(&developerTeamName, "developerTeamName", "developers", " developer team name for this repo")
createCmd.Flags().StringVar(&installCatalogApps, "install-catalog-apps", "", "comma seperated values to install after provision")
createCmd.Flags().StringVar(&gitopsRepoName, "gitops-repo-name", "gitops", "the custom gitops name")
createCmd.Flags().StringVar(&metaphorRepoName, "metaphor-repo-name", "metaphor", "the custom metaphor name")
createCmd.Flags().StringVar(&adminTeamName, "admin-team-name", "admins", "admin team name for this repo")
createCmd.Flags().StringVar(&developerTeamName, "developer-team-name", "developers", "developer team name for this repo")
createCmd.Flags().BoolVar(&useTelemetryFlag, "use-telemetry", true, "whether to emit telemetry")
createCmd.Flags().BoolVar(&installKubefirstProFlag, "install-kubefirst-pro", true, "whether or not to install kubefirst pro")

Expand Down
8 changes: 4 additions & 4 deletions cmd/google/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ func Create() *cobra.Command {
createCmd.Flags().StringVar(&gitlabGroupFlag, "gitlab-group", "", "the GitLab group for the new gitops and metaphor projects - required if using gitlab")
createCmd.Flags().StringVar(&gitopsTemplateBranchFlag, "gitops-template-branch", "", "the branch to clone for the gitops-template repository")
createCmd.Flags().StringVar(&gitopsTemplateURLFlag, "gitops-template-url", "https://github.com/kubefirst/gitops-template.git", "the fully qualified url to the gitops-template repository to clone")
createCmd.Flags().StringVar(&gitopsRepoName, "gitopsRepoName", "gitops", "the custom gitops name")
createCmd.Flags().StringVar(&metaphorRepoName, "metaphorRepoName", "metaphor", "the custom metpahor name")
createCmd.Flags().StringVar(&adminTeamName, "adminTeamName", "admins", "admin team name for this repo ")
createCmd.Flags().StringVar(&developerTeamName, "developerTeamName", "developers", " developer team name for this repo")
createCmd.Flags().StringVar(&installCatalogApps, "install-catalog-apps", "", "comma seperated values to install after provision")
createCmd.Flags().StringVar(&gitopsRepoName, "gitops-repo-name", "gitops", "the custom gitops name")
createCmd.Flags().StringVar(&metaphorRepoName, "metaphor-repo-name", "metaphor", "the custom metaphor name")
createCmd.Flags().StringVar(&adminTeamName, "admin-team-name", "admins", "admin team name for this repo")
createCmd.Flags().StringVar(&developerTeamName, "developer-team-name", "developers", "developer team name for this repo")
createCmd.Flags().BoolVar(&useTelemetryFlag, "use-telemetry", true, "whether to emit telemetry")
createCmd.Flags().BoolVar(&forceDestroyFlag, "force-destroy", false, "allows force destruction on objects (helpful for test environments, defaults to false)")
createCmd.Flags().BoolVar(&installKubefirstProFlag, "install-kubefirst-pro", true, "whether or not to install kubefirst pro")
Expand Down
8 changes: 4 additions & 4 deletions cmd/k3d/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ func Create() *cobra.Command {
createCmd.Flags().StringVar(&gitopsTemplateURLFlag, "gitops-template-url", "https://github.com/kubefirst/gitops-template.git", "the fully qualified url to the gitops-template repository to clone")
createCmd.Flags().StringVar(&installCatalogApps, "install-catalog-apps", "", "comma seperated values of catalog apps to install after provision")
createCmd.Flags().BoolVar(&useTelemetryFlag, "use-telemetry", true, "whether to emit telemetry")
createCmd.Flags().StringVar(&gitopsRepoName, "gitopsRepoName", "gitops", "the custom gitops name")
createCmd.Flags().StringVar(&metaphorRepoName, "metaphorRepoName", "metaphor", "the custom metaphor name")
createCmd.Flags().StringVar(&adminTeamName, "adminTeamName", "admins", "admin team name for this repo")
createCmd.Flags().StringVar(&developerTeamName, "developerTeamName", "developers", "developer team name for this repo")
createCmd.Flags().StringVar(&gitopsRepoName, "gitops-repo-name", "gitops", "the custom gitops name")
createCmd.Flags().StringVar(&metaphorRepoName, "metaphor-repo-name", "metaphor", "the custom metaphor name")
createCmd.Flags().StringVar(&adminTeamName, "admin-team-name", "admins", "admin team name for this repo")
createCmd.Flags().StringVar(&developerTeamName, "developer-team-name", "developers", "developer team name for this repo")

return createCmd
}
Expand Down
9 changes: 5 additions & 4 deletions cmd/k3d/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,22 +109,22 @@ func runK3d(cmd *cobra.Command, args []string) error {
return err
}

gitopsRepoName, err := cmd.Flags().GetString("gitopsRepoName")
gitopsRepoName, err := cmd.Flags().GetString("gitops-repo-name")
if err != nil {
return err
}

metaphorRepoName, err := cmd.Flags().GetString("metaphorRepoName")
metaphorRepoName, err := cmd.Flags().GetString("metaphor-repo-name")
if err != nil {
return err
}

adminTeamName, err := cmd.Flags().GetString("adminTeamName")
adminTeamName, err := cmd.Flags().GetString("admin-team-name")
if err != nil {
return err
}

developerTeamName, err := cmd.Flags().GetString("developerTeamName")
developerTeamName, err := cmd.Flags().GetString("developer-team-name")
if err != nil {
return err
}
Expand Down Expand Up @@ -631,6 +631,7 @@ func runK3d(cmd *cobra.Command, args []string) error {
return prep_err
}

return nil
progressPrinter.AddTracker("applying-git-terraform", fmt.Sprintf("Applying %s Terraform", config.GitProvider), 1)
progressPrinter.SetupProgress(progressPrinter.TotalOfTrackers(), false)

Expand Down
8 changes: 4 additions & 4 deletions cmd/k3s/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ func Create() *cobra.Command {
createCmd.Flags().StringVar(&gitlabGroupFlag, "gitlab-group", "", "the GitLab group for the new gitops and metaphor projects - required if using gitlab")
createCmd.Flags().StringVar(&gitopsTemplateBranchFlag, "gitops-template-branch", "", "the branch to clone for the gitops-template repository")
createCmd.Flags().StringVar(&gitopsTemplateURLFlag, "gitops-template-url", "https://github.com/kubefirst/gitops-template.git", "the fully qualified url to the gitops-template repository to clone")
createCmd.Flags().StringVar(&gitopsRepoName, "gitopsRepoName", "gitops", "the custom gitops name")
createCmd.Flags().StringVar(&metaphorRepoName, "metaphorRepoName", "metaphor", "the custom metpahor name")
createCmd.Flags().StringVar(&adminTeamName, "adminTeamName", "admins", "admin team name for this repo ")
createCmd.Flags().StringVar(&developerTeamName, "developerTeamName", "developers", " developer team name for this repo")
createCmd.Flags().StringVar(&installCatalogApps, "install-catalog-apps", "", "comma seperated values to install after provision")
createCmd.Flags().StringVar(&gitopsRepoName, "gitops-repo-name", "gitops", "the custom gitops name")
createCmd.Flags().StringVar(&metaphorRepoName, "metaphor-repo-name", "metaphor", "the custom metaphor name")
createCmd.Flags().StringVar(&adminTeamName, "admin-team-name", "admins", "admin team name for this repo")
createCmd.Flags().StringVar(&developerTeamName, "developer-team-name", "developers", "developer team name for this repo")
createCmd.Flags().BoolVar(&useTelemetryFlag, "use-telemetry", true, "whether to emit telemetry")
createCmd.Flags().BoolVar(&forceDestroyFlag, "force-destroy", false, "allows force destruction on objects (helpful for test environments, defaults to false)")
createCmd.Flags().BoolVar(&installKubefirstProFlag, "install-kubefirst-pro", true, "whether or not to install kubefirst pro")
Expand Down
8 changes: 4 additions & 4 deletions cmd/vultr/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,11 @@ func Create() *cobra.Command {
createCmd.Flags().StringVar(&gitlabGroupFlag, "gitlab-group", "", "the GitLab group for the new gitops and metaphor projects - required if using gitlab")
createCmd.Flags().StringVar(&gitopsTemplateBranchFlag, "gitops-template-branch", "", "the branch to clone for the gitops-template repository")
createCmd.Flags().StringVar(&gitopsTemplateURLFlag, "gitops-template-url", "https://github.com/kubefirst/gitops-template.git", "the fully qualified url to the gitops-template repository to clone")
createCmd.Flags().StringVar(&gitopsRepoName, "gitopsRepoName", "gitops", "the custom gitops name")
createCmd.Flags().StringVar(&metaphorRepoName, "metaphorRepoName", "metaphor", "the custom metpahor name")
createCmd.Flags().StringVar(&adminTeamName, "adminTeamName", "admins", "admin team name for this repo ")
createCmd.Flags().StringVar(&developerTeamName, "developerTeamName", "developers", " developer team name for this repo")
createCmd.Flags().StringVar(&installCatalogApps, "install-catalog-apps", "", "comma seperated values to install after provision")
createCmd.Flags().StringVar(&gitopsRepoName, "gitops-repo-name", "gitops", "the custom gitops name")
createCmd.Flags().StringVar(&metaphorRepoName, "metaphor-repo-name", "metaphor", "the custom metaphor name")
createCmd.Flags().StringVar(&adminTeamName, "admin-team-name", "admins", "admin team name for this repo")
createCmd.Flags().StringVar(&developerTeamName, "developer-team-name", "developers", "developer team name for this repo")
createCmd.Flags().BoolVar(&useTelemetryFlag, "use-telemetry", true, "whether to emit telemetry")
createCmd.Flags().BoolVar(&installKubefirstProFlag, "install-kubefirst-pro", true, "whether or not to install kubefirst pro")

Expand Down
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ require (
github.com/prometheus/common v0.39.0 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/robfig/cron/v3 v3.0.1 // indirect
github.com/rogpeppe/go-internal v1.8.1 // indirect
github.com/rs/xid v1.4.0 // indirect
github.com/russross/blackfriday v1.6.0 // indirect
github.com/sahilm/fuzzy v0.1.0 // indirect
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,6 @@ github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4=
github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI=
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
Expand Down Expand Up @@ -1016,7 +1015,6 @@ github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzG
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg=
github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o=
github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=
github.com/rs/xid v1.4.0 h1:qd7wPTDkN6KQx2VmMBLrpHkiyQwgFXRnkOLacUiaSNY=
github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
Expand Down
8 changes: 4 additions & 4 deletions internal/utilities/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,25 +80,25 @@ func GetFlags(cmd *cobra.Command, cloudProvider string) (types.CliFlags, error)
return cliFlags, err
}

gitopsRepoNameFlag, err := cmd.Flags().GetString("gitopsRepoName")
gitopsRepoNameFlag, err := cmd.Flags().GetString("gitops-repo-name")
if err != nil {
progress.Error(err.Error())
return cliFlags, err
}

metaphorRepoNameFlag, err := cmd.Flags().GetString("metaphorRepoName")
metaphorRepoNameFlag, err := cmd.Flags().GetString("metaphor-repo-name")
if err != nil {
progress.Error(err.Error())
return cliFlags, err
}

adminTeamNameFlag, err := cmd.Flags().GetString("adminTeamName")
adminTeamNameFlag, err := cmd.Flags().GetString("admin-team-name")
if err != nil {
progress.Error(err.Error())
return cliFlags, err
}

developerTeamNameFlag, err := cmd.Flags().GetString("developerTeamName")
developerTeamNameFlag, err := cmd.Flags().GetString("developer-team-name")
if err != nil {
progress.Error(err.Error())
return cliFlags, err
Expand Down

0 comments on commit 6e6a233

Please sign in to comment.