Do not export Router.route as it is not supposed to be called directly

This commit is contained in:
Mickael Remond
2019-06-24 11:13:25 +02:00
committed by Mickaël Rémond
parent 3521c488ea
commit d6d371df4d
4 changed files with 54 additions and 54 deletions

View File

@@ -29,7 +29,9 @@ func NewRouter() *Router {
return &Router{}
}
func (r *Router) Route(s Sender, p Packet) {
// route is called by the XMPP client to dispatch stanza received using the set up routes.
// It is also used by test, but is not supposed to be used directly by users of the library.
func (r *Router) route(s Sender, p Packet) {
var match RouteMatch
if r.Match(p, &match) {
match.Handler.HandlePacket(s, p)