bearer: Add method IsSetAPEOverride #227

Closed
acid-ant wants to merge 1 commit from acid-ant/frostfs-sdk-go:feature/token-bearer into master
Showing only changes of commit 2a04a40710 - Show all commits

View file

@ -313,6 +313,13 @@ func (b *Token) SetAPEOverride(v APEOverride) {
b.apeOverrideSet = true b.apeOverrideSet = true
} }
// IsSetAPEOverride return true if APEOverride is set.
//
// See also: APEOverride.
func (b *Token) IsSetAPEOverride() bool {
Review

Why do we need this? Empty table is valid because it is not an optional parameter.

Why do we need this? Empty table is valid because it is not an optional parameter.
Review

To quickly check that table is empty, to avoid checking equality to empty.

To quickly check that table is empty, to avoid checking equality to empty.
Review

I mean, when it is missing, we can assume it is present and is empty.

I mean, when it is missing, we can assume it is present and is empty.
return b.apeOverrideSet
}
// APEOverride returns APE override set by SetAPEOverride. // APEOverride returns APE override set by SetAPEOverride.
// //
// Zero Token has zero APEOverride. // Zero Token has zero APEOverride.