Skip to content

Commit

Permalink
Mark --eksGoReleases required for eksGoRelease
Browse files Browse the repository at this point in the history
  • Loading branch information
wongma7 committed Apr 4, 2024
1 parent 79012ce commit d6a9f85
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions tools/eksDistroBuildToolingOpsTools/cmd/eksGoRelease/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (

const (
eksGoReleasesFlag = "eksGoReleases"
dryrunFlag = "dryrun"
userFlag = "user"
emailFlag = "email"
dryrunFlag = "dryrun"
userFlag = "user"
emailFlag = "email"
)

var (
Expand All @@ -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)

Check failure on line 33 in tools/eksDistroBuildToolingOpsTools/cmd/eksGoRelease/cmd/root.go

View workflow job for this annotation

GitHub Actions / lint

Error return value of `rootCmd.MarkPersistentFlagRequired` is not checked (errcheck)
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 {
Expand Down

0 comments on commit d6a9f85

Please sign in to comment.