File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -862,10 +862,10 @@ func (c *Command) execute(a []string) (err error) {
862862 c .PreRun (c , argWoFlags )
863863 }
864864
865- if err := c .validateRequiredFlags (); err != nil {
865+ if err := c .ValidateRequiredFlags (); err != nil {
866866 return err
867867 }
868- if err := c .validateFlagGroups (); err != nil {
868+ if err := c .ValidateFlagGroups (); err != nil {
869869 return err
870870 }
871871
@@ -1019,7 +1019,8 @@ func (c *Command) ValidateArgs(args []string) error {
10191019 return c .Args (c , args )
10201020}
10211021
1022- func (c * Command ) validateRequiredFlags () error {
1022+ // ValidateRequiredFlags validates all required flags are present and returns an error otherwise
1023+ func (c * Command ) ValidateRequiredFlags () error {
10231024 if c .DisableFlagParsing {
10241025 return nil
10251026 }
Original file line number Diff line number Diff line change @@ -59,9 +59,9 @@ func (c *Command) MarkFlagsMutuallyExclusive(flagNames ...string) {
5959 }
6060}
6161
62- // validateFlagGroups validates the mutuallyExclusive/requiredAsGroup logic and returns the
62+ // ValidateFlagGroups validates the mutuallyExclusive/requiredAsGroup logic and returns the
6363// first error encountered.
64- func (c * Command ) validateFlagGroups () error {
64+ func (c * Command ) ValidateFlagGroups () error {
6565 if c .DisableFlagParsing {
6666 return nil
6767 }
You can’t perform that action at this time.
0 commit comments