Rename MiddlewareParams to Params to avoid stuttering
This commit is contained in:
@@ -21,8 +21,8 @@ import (
|
|||||||
// CORSMaxAgeSeconds is the max age for CORS preflight cache (24 hours).
|
// CORSMaxAgeSeconds is the max age for CORS preflight cache (24 hours).
|
||||||
const CORSMaxAgeSeconds = 86400
|
const CORSMaxAgeSeconds = 86400
|
||||||
|
|
||||||
// MiddlewareParams defines dependencies for Middleware.
|
// Params defines dependencies for Middleware.
|
||||||
type MiddlewareParams struct {
|
type Params struct {
|
||||||
fx.In
|
fx.In
|
||||||
Logger *logger.Logger
|
Logger *logger.Logger
|
||||||
Config *config.Config
|
Config *config.Config
|
||||||
@@ -35,7 +35,7 @@ type Middleware struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// New creates a new Middleware instance.
|
// New creates a new Middleware instance.
|
||||||
func New(lc fx.Lifecycle, params MiddlewareParams) (*Middleware, error) {
|
func New(lc fx.Lifecycle, params Params) (*Middleware, error) {
|
||||||
s := &Middleware{
|
s := &Middleware{
|
||||||
log: params.Logger.Get(),
|
log: params.Logger.Get(),
|
||||||
config: params.Config,
|
config: params.Config,
|
||||||
|
|||||||
Reference in New Issue
Block a user