@@ -108,7 +108,7 @@ func newIncidentGetCmd() *cobra.Command {
108108 return & cobra.Command {
109109 Use : "get <id> [<id2> ...]" ,
110110 Short : "Get incident details" ,
111- Args : cobra . MinimumNArgs ( 1 ),
111+ Args : requireArgs ( "incident_id" ),
112112 RunE : func (cmd * cobra.Command , args []string ) error {
113113 client , err := newClient ()
114114 if err != nil {
@@ -252,7 +252,7 @@ func newIncidentUpdateCmd() *cobra.Command {
252252 cmd := & cobra.Command {
253253 Use : "update <id>" ,
254254 Short : "Update an incident" ,
255- Args : cobra . ExactArgs ( 1 ),
255+ Args : requireArgs ( "incident_id" ),
256256 RunE : func (cmd * cobra.Command , args []string ) error {
257257 client , err := newClient ()
258258 if err != nil {
@@ -302,7 +302,7 @@ func newIncidentAckCmd() *cobra.Command {
302302 return & cobra.Command {
303303 Use : "ack <id> [<id2> ...]" ,
304304 Short : "Acknowledge incidents" ,
305- Args : cobra . MinimumNArgs ( 1 ),
305+ Args : requireArgs ( "incident_id" ),
306306 RunE : func (cmd * cobra.Command , args []string ) error {
307307 client , err := newClient ()
308308 if err != nil {
@@ -321,7 +321,7 @@ func newIncidentCloseCmd() *cobra.Command {
321321 return & cobra.Command {
322322 Use : "close <id> [<id2> ...]" ,
323323 Short : "Close incidents" ,
324- Args : cobra . MinimumNArgs ( 1 ),
324+ Args : requireArgs ( "incident_id" ),
325325 RunE : func (cmd * cobra.Command , args []string ) error {
326326 client , err := newClient ()
327327 if err != nil {
@@ -340,7 +340,7 @@ func newIncidentTimelineCmd() *cobra.Command {
340340 return & cobra.Command {
341341 Use : "timeline <id>" ,
342342 Short : "View incident timeline" ,
343- Args : cobra . ExactArgs ( 1 ),
343+ Args : requireArgs ( "incident_id" ),
344344 RunE : func (cmd * cobra.Command , args []string ) error {
345345 client , err := newClient ()
346346 if err != nil {
@@ -381,7 +381,7 @@ func newIncidentAlertsCmd() *cobra.Command {
381381 cmd := & cobra.Command {
382382 Use : "alerts <id>" ,
383383 Short : "View incident alerts" ,
384- Args : cobra . ExactArgs ( 1 ),
384+ Args : requireArgs ( "incident_id" ),
385385 RunE : func (cmd * cobra.Command , args []string ) error {
386386 client , err := newClient ()
387387 if err != nil {
@@ -427,7 +427,7 @@ func newIncidentSimilarCmd() *cobra.Command {
427427 cmd := & cobra.Command {
428428 Use : "similar <id>" ,
429429 Short : "Find similar incidents" ,
430- Args : cobra . ExactArgs ( 1 ),
430+ Args : requireArgs ( "incident_id" ),
431431 RunE : func (cmd * cobra.Command , args []string ) error {
432432 client , err := newClient ()
433433 if err != nil {
0 commit comments