@@ -67,9 +67,6 @@ func policyGetObligation(cmd *cobra.Command, args []string) {
6767 id := c .Flags .GetOptionalID ("id" )
6868 fqn := c .Flags .GetOptionalString ("fqn" )
6969
70- cmd .MarkFlagsOneRequired ("id" , "fqn" )
71- cmd .MarkFlagsMutuallyExclusive ("id" , "fqn" )
72-
7370 obl , err := h .GetObligation (cmd .Context (), id , fqn )
7471 if err != nil {
7572 identifier := fmt .Sprintf ("id: %s" , id )
@@ -168,9 +165,6 @@ func policyDeleteObligation(cmd *cobra.Command, args []string) {
168165 id := c .Flags .GetOptionalID ("id" )
169166 fqn := c .Flags .GetOptionalString ("fqn" )
170167
171- cmd .MarkFlagsOneRequired ("id" , "fqn" )
172- cmd .MarkFlagsMutuallyExclusive ("id" , "fqn" )
173-
174168 force := c .Flags .GetRequiredBool ("force" )
175169 ctx := cmd .Context ()
176170
@@ -252,9 +246,6 @@ func policyGetObligationValue(cmd *cobra.Command, args []string) {
252246 id := c .Flags .GetOptionalID ("id" )
253247 fqn := c .Flags .GetOptionalString ("fqn" )
254248
255- cmd .MarkFlagsOneRequired ("id" , "fqn" )
256- cmd .MarkFlagsMutuallyExclusive ("id" , "fqn" )
257-
258249 value , err := h .GetObligationValue (cmd .Context (), id , fqn )
259250 if err != nil {
260251 identifier := fmt .Sprintf ("id: %s" , id )
@@ -329,9 +320,6 @@ func policyDeleteObligationValue(cmd *cobra.Command, args []string) {
329320 id := c .Flags .GetOptionalID ("id" )
330321 fqn := c .Flags .GetOptionalString ("fqn" )
331322
332- cmd .MarkFlagsOneRequired ("id" , "fqn" )
333- cmd .MarkFlagsMutuallyExclusive ("id" , "fqn" )
334-
335323 force := c .Flags .GetOptionalBool ("force" )
336324 ctx := cmd .Context ()
337325
@@ -525,6 +513,8 @@ func initObligationsCommands() {
525513 getDoc .GetDocFlag ("fqn" ).Default ,
526514 getDoc .GetDocFlag ("fqn" ).Description ,
527515 )
516+ getDoc .MarkFlagsMutuallyExclusive ("id" , "fqn" )
517+ getDoc .MarkFlagsOneRequired ("id" , "fqn" )
528518
529519 listDoc := man .Docs .GetCommand ("policy/obligations/list" ,
530520 man .WithRun (policyListObligations ),
@@ -598,6 +588,8 @@ func initObligationsCommands() {
598588 false ,
599589 deleteDoc .GetDocFlag ("force" ).Description ,
600590 )
591+ deleteDoc .MarkFlagsMutuallyExclusive ("id" , "fqn" )
592+ deleteDoc .MarkFlagsOneRequired ("id" , "fqn" )
601593
602594 // Obligation Values commands
603595
@@ -616,6 +608,8 @@ func initObligationsCommands() {
616608 getValueDoc .GetDocFlag ("fqn" ).Default ,
617609 getValueDoc .GetDocFlag ("fqn" ).Description ,
618610 )
611+ getValueDoc .MarkFlagsMutuallyExclusive ("id" , "fqn" )
612+ getValueDoc .MarkFlagsOneRequired ("id" , "fqn" )
619613
620614 createValueDoc := man .Docs .GetCommand ("policy/obligations/values/create" ,
621615 man .WithRun (policyCreateObligationValue ),
@@ -682,6 +676,8 @@ func initObligationsCommands() {
682676 false ,
683677 deleteValueDoc .GetDocFlag ("force" ).Description ,
684678 )
679+ deleteValueDoc .MarkFlagsMutuallyExclusive ("id" , "fqn" )
680+ deleteValueDoc .MarkFlagsOneRequired ("id" , "fqn" )
685681
686682 // Obligation Triggers commands
687683 createTriggerDoc := man .Docs .GetCommand ("policy/obligations/triggers/create" ,
0 commit comments