Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command interface {
Execute()
}
Example ¶
package main func main() { key := "uid" commands := []Command{ NewSetIntCommand(key, 123456), NewPrintValueCommand(key), } runCommands(commands...) } func runCommands(commands ...Command) { for _, c := range commands { c.Execute() } }
Output: 123456
type PrintValueCommand ¶
type PrintValueCommand struct {
// contains filtered or unexported fields
}
func NewPrintValueCommand ¶
func NewPrintValueCommand(key string) *PrintValueCommand
func (*PrintValueCommand) Execute ¶
func (p *PrintValueCommand) Execute()
type SetIntCommand ¶
type SetIntCommand struct {
// contains filtered or unexported fields
}
func NewSetIntCommand ¶
func NewSetIntCommand(key string, value int) *SetIntCommand
func (*SetIntCommand) Execute ¶
func (p *SetIntCommand) Execute()
Click to show internal directories.
Click to hide internal directories.