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).
|
||||
const CORSMaxAgeSeconds = 86400
|
||||
|
||||
// MiddlewareParams defines dependencies for Middleware.
|
||||
type MiddlewareParams struct {
|
||||
// Params defines dependencies for Middleware.
|
||||
type Params struct {
|
||||
fx.In
|
||||
Logger *logger.Logger
|
||||
Config *config.Config
|
||||
@@ -35,7 +35,7 @@ type Middleware struct {
|
||||
}
|
||||
|
||||
// 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{
|
||||
log: params.Logger.Get(),
|
||||
config: params.Config,
|
||||
|
||||
Reference in New Issue
Block a user