Skip to content

Commit a94e55e

Browse files
authored
handle error from MarkFlagRequired("input") with cobra.CheckErr (#25)
1 parent c6298da commit a94e55e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/gen/gen.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func New() *cobra.Command {
3939
cmd.Flags().BoolVarP(&typed, "typed", "t", true, "Generated Typed API")
4040
cmd.Flags().StringVarP(&output, "output", "o", defaultOutPath, "Directory to place generated code")
4141
cmd.Flags().StringVarP(&input, "input", "i", "", "Path to Go interface file with raw SQL annotations")
42-
cmd.MarkFlagRequired("input")
42+
cobra.CheckErr(cmd.MarkFlagRequired("input"))
4343

4444
return cmd
4545
}

0 commit comments

Comments
 (0)