Skip to content

Commit

Permalink
Add bool flag interface
Browse files Browse the repository at this point in the history
  • Loading branch information
dearchap committed Jan 9, 2023
1 parent 166e986 commit fa750ab
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions flag_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ func (v *valueWrapper) Get() any {
return v.value.Get()
}

func (v *valueWrapper) IsBoolFlag() bool {
_, ok := v.value.(*boolValue)
return ok
}

// ValueCreator is responsible for creating a flag.Value emulation
// as well as custom formatting
//
Expand Down

0 comments on commit fa750ab

Please sign in to comment.