Skip to content
Snippets Groups Projects
Commit 56442204 authored by pantianying's avatar pantianying
Browse files

add comment for tagRouter Create

parent fb3c36e0
No related branches found
No related tags found
No related merge requests found
......@@ -30,14 +30,18 @@ func init() {
type tagRouterFactory struct{}
// NewTagRouterFactory create a tagRouterFactory
func NewTagRouterFactory() router.RouterFactory {
return &tagRouterFactory{}
}
// NewRouter create a tagRouter by tagRouterFactory with a url
// The url contains router configuration information
func (c *tagRouterFactory) NewRouter(url *common.URL) (router.Router, error) {
return NewTagRouter(url)
}
// NewFileRouter create a tagRouter by profile content
func (c *tagRouterFactory) NewFileRouter(content []byte) (router.Router, error) {
return NewFileTagRouter(content)
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment