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 Feb 6, 2025
1 parent c6b5053 commit 82309c6
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 @@ -49,12 +49,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 82309c6

Please sign in to comment.