added some docs. removed some whitespace.

master
Charles Iliya Krempeaux 2015-10-10 02:17:00 -07:00
parent 7b9d03c556
commit 99f30eff97
2 changed files with 6 additions and 1 deletions

View File

@ -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{}

View File

@ -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)
}
}