Change summary
main.go | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
Detailed changes
@@ -61,8 +61,12 @@ func init() {
rootCmd.Flags().StringVarP(&scope, "scope", "s", "", "commit scope (optional)")
rootCmd.Flags().BoolVarP(&breakingChange, "breaking", "B", false, "mark as breaking change (optional)")
- rootCmd.MarkFlagRequired("type")
- rootCmd.MarkFlagRequired("message")
+ if err := rootCmd.MarkFlagRequired("type"); err != nil {
+ panic(err)
+ }
+ if err := rootCmd.MarkFlagRequired("message"); err != nil {
+ panic(err)
+ }
}
func main() {