switched NewDiscardRouter() to return the same instance each time.
parent
f151008688
commit
7b9d03c556
|
@ -1,10 +1,12 @@
|
|||
package flog
|
||||
|
||||
|
||||
func NewDiscardRouter() *DiscardRouter {
|
||||
router := DiscardRouter{}
|
||||
var (
|
||||
singltonDiscardRouter = DiscardRouter{}
|
||||
)
|
||||
|
||||
return &router
|
||||
func NewDiscardRouter() *DiscardRouter {
|
||||
return &singltonDiscardRouter
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue