Skip to content

Commit

Permalink
linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
soundvibe committed Nov 12, 2020
1 parent 9af0b72 commit 5814642
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/query/api/v1/handler/database/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ type Handler struct {
instrumentOpts instrument.Options
}

type AddRouteFn func(path string, handler http.Handler, methods ...string)
type addRouteFn func(path string, handler http.Handler, methods ...string)

// RegisterRoutes registers the namespace routes
func RegisterRoutes(
addRoute AddRouteFn,
addRoute addRouteFn,
client clusterclient.Client,
cfg config.Configuration,
embeddedDbCfg *dbconfig.DBConfiguration,
Expand Down
4 changes: 2 additions & 2 deletions src/query/api/v1/handler/namespace/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ type Handler struct {
instrumentOpts instrument.Options
}

type AddRouteFn func(path string, handler http.Handler, methods ...string)
type addRouteFn func(path string, handler http.Handler, methods ...string)

// Metadata returns the current metadata in the given store and its version
func Metadata(store kv.Store) ([]namespace.Metadata, int, error) {
Expand Down Expand Up @@ -103,7 +103,7 @@ func Metadata(store kv.Store) ([]namespace.Metadata, int, error) {

// RegisterRoutes registers the namespace routes.
func RegisterRoutes(
addRouteFn AddRouteFn,
addRouteFn addRouteFn,
client clusterclient.Client,
clusters m3.Clusters,
defaults []handleroptions.ServiceOptionsDefault,
Expand Down
4 changes: 2 additions & 2 deletions src/query/api/v1/handler/topic/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ type Handler struct {
instrumentOpts instrument.Options
}

type AddRouteFn func(path string, handler http.Handler, methods ...string)
type addRouteFn func(path string, handler http.Handler, methods ...string)

// Service gets a topic service from m3cluster client
func Service(clusterClient clusterclient.Client, opts handleroptions.ServiceOptions) (topic.Service, error) {
Expand All @@ -71,7 +71,7 @@ func Service(clusterClient clusterclient.Client, opts handleroptions.ServiceOpti

// RegisterRoutes registers the topic routes
func RegisterRoutes(
addRoute AddRouteFn,
addRoute addRouteFn,
client clusterclient.Client,
cfg config.Configuration,
instrumentOpts instrument.Options,
Expand Down
7 changes: 6 additions & 1 deletion src/query/api/v1/httpd/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,12 @@ func (h *Handler) RegisterRoutes() error {
return nil
}

func (h *Handler) addRoute(router *mux.Router, path string, handler http.Handler, methods []string) {
func (h *Handler) addRoute(
router *mux.Router,
path string,
handler http.Handler,
methods []string,
) {
h.addRouteHandlerFn(router, path, handler.ServeHTTP, methods...)
}

Expand Down

0 comments on commit 5814642

Please sign in to comment.