Documentation
¶
Overview ¶
Package decorator is an example of the Decorator Pattern.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Component ¶
type Component interface {
Operation() string
}
Component provides an interface for a decorator and component.
type ConcreteComponent ¶
type ConcreteComponent struct {
}
ConcreteComponent implements a component.
func (*ConcreteComponent) Operation ¶
func (c *ConcreteComponent) Operation() string
Operation implementation.
type ConcreteDecorator ¶
type ConcreteDecorator struct {
// contains filtered or unexported fields
}
ConcreteDecorator implements a decorator.
func (*ConcreteDecorator) Operation ¶
func (d *ConcreteDecorator) Operation() string
Operation wraps operation of component
Click to show internal directories.
Click to hide internal directories.