mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
Fix linter issues: interfacer
This commit is contained in:
parent
379e5daf44
commit
573ec91fc2
3 changed files with 5 additions and 5 deletions
2
Makefile
2
Makefile
|
|
@ -109,7 +109,7 @@ docker-test:
|
|||
docker run --rm -v $(PWD):/go/src/$(CLONE_URL) -w /go/src/$(CLONE_URL) golang:$(GO_VERSION) go test -tags='$(BUILD_TAGS)' $(TESTFLAGS) ./...
|
||||
|
||||
metalinter:
|
||||
gometalinter --vendor --disable-all --enable=gotype --enable=gotypex --enable=gofmt --enable=goimports --deadline=60s --exclude "^internal/.*\.pb\.go" ./...
|
||||
gometalinter --vendor --disable-all --enable=gotype --enable=gotypex --enable=gofmt --enable=goimports --enable=interfacer --deadline=60s --exclude "^internal/.*\.pb\.go" ./...
|
||||
|
||||
######################
|
||||
# Build dependencies #
|
||||
|
|
|
|||
|
|
@ -1374,7 +1374,7 @@ func (e *executor) executeSetColumnAttrs(ctx context.Context, index string, c *p
|
|||
}
|
||||
|
||||
// exec executes a PQL query remotely for a set of shards on a node.
|
||||
func (e *executor) remoteExec(ctx context.Context, node *Node, index string, q *pql.Query, shards []uint64, opt *execOptions) (results []interface{}, err error) {
|
||||
func (e *executor) remoteExec(ctx context.Context, node *Node, index string, q *pql.Query, shards []uint64, opt *execOptions) (results []interface{}, err error) { // nolint: interfacer
|
||||
// Encode request object.
|
||||
pbreq := &QueryRequest{
|
||||
Query: q.String(),
|
||||
|
|
|
|||
|
|
@ -878,7 +878,7 @@ func (h *Handler) readURLQueryRequest(r *http.Request) (*pilosa.QueryRequest, er
|
|||
}
|
||||
|
||||
// writeQueryResponse writes the response from the executor to w.
|
||||
func (h *Handler) writeQueryResponse(w http.ResponseWriter, r *http.Request, resp *pilosa.QueryResponse) error {
|
||||
func (h *Handler) writeQueryResponse(w io.Writer, r *http.Request, resp *pilosa.QueryResponse) error {
|
||||
if !validHeaderAcceptJSON(r.Header) {
|
||||
return h.writeProtobufQueryResponse(w, resp)
|
||||
}
|
||||
|
|
@ -886,7 +886,7 @@ func (h *Handler) writeQueryResponse(w http.ResponseWriter, r *http.Request, res
|
|||
}
|
||||
|
||||
// writeProtobufQueryResponse writes the response from the executor to w as protobuf.
|
||||
func (h *Handler) writeProtobufQueryResponse(w http.ResponseWriter, resp *pilosa.QueryResponse) error {
|
||||
func (h *Handler) writeProtobufQueryResponse(w io.Writer, resp *pilosa.QueryResponse) error {
|
||||
if buf, err := h.api.Serializer.Marshal(resp); err != nil {
|
||||
return errors.Wrap(err, "marshalling")
|
||||
} else if _, err := w.Write(buf); err != nil {
|
||||
|
|
@ -896,7 +896,7 @@ func (h *Handler) writeProtobufQueryResponse(w http.ResponseWriter, resp *pilosa
|
|||
}
|
||||
|
||||
// writeJSONQueryResponse writes the response from the executor to w as JSON.
|
||||
func (h *Handler) writeJSONQueryResponse(w http.ResponseWriter, resp *pilosa.QueryResponse) error {
|
||||
func (h *Handler) writeJSONQueryResponse(w io.Writer, resp *pilosa.QueryResponse) error {
|
||||
return json.NewEncoder(w).Encode(resp)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue