Skip to content

Commit 2a8bf1f

Browse files
authored
Merge pull request #2151 from huiyifyj/bool-with-inverse-local
2 parents cb0fc21 + 5f71700 commit 2a8bf1f

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

flag_bool_with_inverse.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ func (bif *BoolWithInverseFlag) RunAction(ctx context.Context, cmd *Command) err
5555
return nil
5656
}
5757

58+
func (bif *BoolWithInverseFlag) IsLocal() bool {
59+
return bif.Local
60+
}
61+
5862
func (bif *BoolWithInverseFlag) inversePrefix() string {
5963
if bif.InversePrefix == "" {
6064
bif.InversePrefix = DefaultInverseBoolPrefix

godoc-current.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,8 @@ func (bif *BoolWithInverseFlag) IsBoolFlag() bool
367367
func (bif *BoolWithInverseFlag) IsDefaultVisible() bool
368368
IsDefaultVisible returns true if the flag is not hidden, otherwise false
369369

370+
func (bif *BoolWithInverseFlag) IsLocal() bool
371+
370372
func (bif *BoolWithInverseFlag) IsRequired() bool
371373

372374
func (bif *BoolWithInverseFlag) IsSet() bool

testdata/godoc-v3.x.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,8 @@ func (bif *BoolWithInverseFlag) IsBoolFlag() bool
367367
func (bif *BoolWithInverseFlag) IsDefaultVisible() bool
368368
IsDefaultVisible returns true if the flag is not hidden, otherwise false
369369

370+
func (bif *BoolWithInverseFlag) IsLocal() bool
371+
370372
func (bif *BoolWithInverseFlag) IsRequired() bool
371373

372374
func (bif *BoolWithInverseFlag) IsSet() bool

0 commit comments

Comments
 (0)