mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
cleanup - address review feedback
This commit is contained in:
parent
6093064ac0
commit
8878b02345
3 changed files with 4 additions and 12 deletions
2
api.go
2
api.go
|
|
@ -50,7 +50,7 @@ type API struct {
|
|||
}
|
||||
|
||||
// APIOption is a functional option type for pilosa.API
|
||||
type APIOption func(s *API) error
|
||||
type APIOption func(*API) error
|
||||
|
||||
func OptAPIServer(s *Server) APIOption {
|
||||
return func(a *API) error {
|
||||
|
|
|
|||
|
|
@ -87,11 +87,10 @@ func TestImportCommand_RunValue(t *testing.T) {
|
|||
}
|
||||
|
||||
cmd := test.MustRunMainWithCluster(t, 1)[0]
|
||||
hostport := cmd.Server.URI.HostPort()
|
||||
cm.Host = hostport
|
||||
cm.Host = cmd.Server.URI.HostPort()
|
||||
|
||||
http.DefaultClient.Do(MustNewHTTPRequest("POST", "http://"+hostport+"/index/i", strings.NewReader("")))
|
||||
http.DefaultClient.Do(MustNewHTTPRequest("POST", "http://"+hostport+"/index/i/field/f", strings.NewReader(`{"options":{"type": "int", "min": 0, "max": 100}}`)))
|
||||
http.DefaultClient.Do(MustNewHTTPRequest("POST", "http://"+cm.Host+"/index/i", strings.NewReader("")))
|
||||
http.DefaultClient.Do(MustNewHTTPRequest("POST", "http://"+cm.Host+"/index/i/field/f", strings.NewReader(`{"options":{"type": "int", "min": 0, "max": 100}}`)))
|
||||
|
||||
cm.Index = "i"
|
||||
cm.Field = "f"
|
||||
|
|
|
|||
|
|
@ -46,13 +46,6 @@ func NewHandler(opts ...http.HandlerOption) (*Handler, error) {
|
|||
Handler: handler,
|
||||
}
|
||||
|
||||
//h.API, err = pilosa.NewAPI(OptAPIServer(s))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
h.Handler.API = h.API
|
||||
h.Handler.API.Executor = &h.Executor
|
||||
|
||||
// Handler test messages can no-op.
|
||||
h.API.Broadcaster = pilosa.NopBroadcaster
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue