added some docs. removed some whitespace.
parent
7b9d03c556
commit
99f30eff97
|
@ -5,11 +5,17 @@ var (
|
|||
singltonDiscardRouter = DiscardRouter{}
|
||||
)
|
||||
|
||||
|
||||
// NewDiscardRouter returns an initialized DiscardRouter.
|
||||
func NewDiscardRouter() *DiscardRouter {
|
||||
return &singltonDiscardRouter
|
||||
}
|
||||
|
||||
|
||||
// DiscardRouter is a Router that discards any message (and its context)
|
||||
// it is asked to route.
|
||||
//
|
||||
// Conceptually it is similar to /dev/null
|
||||
type DiscardRouter struct{}
|
||||
|
||||
|
||||
|
|
|
@ -12,5 +12,4 @@ func TestNewDiscardRouter(t *testing.T) {
|
|||
if nil == router {
|
||||
t.Errorf("After trying to create a discard router, expected it to be not nil, but was: %v", router)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue