Put the query package into http, since it is for http only

This commit is contained in:
Justin Li 2014-07-17 01:00:26 -04:00
parent 343b3358a1
commit 3ad3f11b2c
5 changed files with 4 additions and 4 deletions

View file

@ -45,7 +45,7 @@ func makeHandler(handler ResponseHandler) httprouter.Handle {
}
}
func NewRouter(s *Server) *httprouter.Router {
func newRouter(s *Server) *httprouter.Router {
r := httprouter.New()
if s.config.Private {
@ -79,5 +79,5 @@ func Serve(cfg *config.Config, tkr *tracker.Tracker) {
}
glog.V(0).Info("Starting on ", cfg.Addr)
graceful.Run(cfg.Addr, cfg.RequestTimeout.Duration, NewRouter(srv))
graceful.Run(cfg.Addr, cfg.RequestTimeout.Duration, newRouter(srv))
}

View file

@ -36,7 +36,7 @@ func createServer(tkr *tracker.Tracker, cfg *config.Config) (*httptest.Server, e
config: cfg,
tracker: tkr,
}
return httptest.NewServer(NewRouter(srv)), nil
return httptest.NewServer(newRouter(srv)), nil
}
func announce(p params, srv *httptest.Server) ([]byte, error) {

View file

@ -10,7 +10,7 @@ import (
"github.com/julienschmidt/httprouter"
"github.com/chihaya/chihaya/config"
"github.com/chihaya/chihaya/models/query"
"github.com/chihaya/chihaya/http/query"
"github.com/chihaya/chihaya/tracker/models"
)