From d6a9f854790d8c1064e05d9ca505009dd758a39c Mon Sep 17 00:00:00 2001 From: Matthew Wong Date: Thu, 4 Apr 2024 11:36:34 -0700 Subject: [PATCH] Mark --eksGoReleases required for eksGoRelease --- .../cmd/eksGoRelease/cmd/root.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tools/eksDistroBuildToolingOpsTools/cmd/eksGoRelease/cmd/root.go b/tools/eksDistroBuildToolingOpsTools/cmd/eksGoRelease/cmd/root.go index 8bd33817b..10c76f2e5 100644 --- a/tools/eksDistroBuildToolingOpsTools/cmd/eksGoRelease/cmd/root.go +++ b/tools/eksDistroBuildToolingOpsTools/cmd/eksGoRelease/cmd/root.go @@ -13,9 +13,9 @@ import ( const ( eksGoReleasesFlag = "eksGoReleases" - dryrunFlag = "dryrun" - userFlag = "user" - emailFlag = "email" + dryrunFlag = "dryrun" + userFlag = "user" + emailFlag = "email" ) var ( @@ -30,9 +30,10 @@ var ( func init() { rootCmd.PersistentFlags().IntP("verbosity", "v", 0, "Set the log level verbosity") rootCmd.PersistentFlags().StringSlice(eksGoReleasesFlag, []string{}, "EKS Go releases to update") - rootCmd.PersistentFlags().BoolP(dryrunFlag, "d", false, "run without creating PR") - rootCmd.PersistentFlags().StringP(emailFlag, "e", "", "github email for git functions") - rootCmd.PersistentFlags().StringP(userFlag, "u", "", "github username for git functions") + rootCmd.MarkPersistentFlagRequired(eksGoReleasesFlag) + rootCmd.PersistentFlags().BoolP(dryrunFlag, "d", false, "run without creating PR") + rootCmd.PersistentFlags().StringP(emailFlag, "e", "", "github email for git functions") + rootCmd.PersistentFlags().StringP(userFlag, "u", "", "github username for git functions") // Bind config flags to viper if err := viper.BindPFlags(rootCmd.PersistentFlags()); err != nil {