chainOfResponsibility

package
v0.0.0-...-6e5d4c6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2019 License: MIT Imports: 3 Imported by: 0

README

Chain Of Responsibility

chainOfResponsibility

Image from book Go Design Patterns

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainLogger

type ChainLogger interface {
	Next(string)
}

type ClosureChain

type ClosureChain struct {
	NextChain ChainLogger
	Closure   func(string)
}

func (*ClosureChain) Next

func (c *ClosureChain) Next(s string)

type FirstLogger

type FirstLogger struct {
	NextChain ChainLogger
}

func (*FirstLogger) Next

func (f *FirstLogger) Next(s string)

type SecondLogger

type SecondLogger struct {
	NextChain ChainLogger
}

func (*SecondLogger) Next

func (se *SecondLogger) Next(s string)

type WriterLogger

type WriterLogger struct {
	NextChain ChainLogger
	Writer    io.Writer
}

func (*WriterLogger) Next

func (w *WriterLogger) Next(s string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL