// If returns the receiving Decorator if the given bool is true; otherwise returns a no-op
// Decorator instance.
If returns the receiving Decorator if the given bool is true; otherwise returns a no-op
Decorator instance.
// If returns the receiving Decorator if the given bool is true ; otherwise returns a no - op // Decorator instance .
func (d Decorator) If(b bool) Decorator {
	if d == nil {
		return noopDecorator
	}
	result := noopDecorator
	if b {
		result = d
	}
	return result
}
func ( d Decorator ) If ( b bool ) Decorator { if d == nil { return noopDecorator } result := noopDecorator if b { result = d } return result }
If returns the receiving Decorator if the given bool is true; otherwise returns a no-op
Decorator instance.
If returns the receiving Decorator if the given bool is true ; otherwise returns a no - op Decorator instance .