Skip to content

Commit

Permalink
tool: remove redundant flag validation
Browse files Browse the repository at this point in the history
  • Loading branch information
jingyih committed Dec 12, 2024
1 parent 275d08a commit 69ee3a7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@ func BuildCommand(baseOptions *options.GenerateOptions) *cobra.Command {
if opt.Resource == (options.Resource{}) {
return fmt.Errorf("--resource flag is required")
}
if opt.Resource.Kind == "" {
return fmt.Errorf("need to specify KRM Kind in --resource")
}
if opt.Resource.ProtoName == "" {
return fmt.Errorf("need to specify proto resource name in --resource")
}

if baseOptions.APIVersion == "" {
return fmt.Errorf("--api-version is required")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,6 @@ func BuildCommand(baseOptions *options.GenerateOptions) *cobra.Command {
if opt.Resource == (options.Resource{}) {
return fmt.Errorf("--resource flag is required")
}
if opt.Resource.Kind == "" {
return fmt.Errorf("need to specify KRM Kind in --resource")
}
if opt.Resource.ProtoName == "" {
return fmt.Errorf("need to specify proto resource name in --resource")
}

if baseOptions.APIVersion == "" {
return fmt.Errorf("--api-version is required")
Expand Down

0 comments on commit 69ee3a7

Please sign in to comment.