linting
This commit is contained in:
@@ -410,7 +410,7 @@ func buildGatewayLimits(cfg limitsConfig) *gatewayv1.Limits {
|
||||
if bucket == "" {
|
||||
continue
|
||||
}
|
||||
limits.VelocityLimit[bucket] = int32(value)
|
||||
limits.VelocityLimit[bucket] = int32(value) //nolint:gosec // velocity limits are validated config values
|
||||
}
|
||||
}
|
||||
|
||||
@@ -426,7 +426,7 @@ func buildGatewayLimits(cfg limitsConfig) *gatewayv1.Limits {
|
||||
MinAmount: strings.TrimSpace(override.MinAmount),
|
||||
MaxAmount: strings.TrimSpace(override.MaxAmount),
|
||||
MaxFee: strings.TrimSpace(override.MaxFee),
|
||||
MaxOps: int32(override.MaxOps),
|
||||
MaxOps: int32(override.MaxOps), //nolint:gosec // max ops is a validated config value
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -522,11 +522,12 @@ func (i *Imp) startHTTPCallbackServer(svc *mntxservice.Service, cfg callbackRunt
|
||||
})
|
||||
|
||||
server := &http.Server{
|
||||
Addr: cfg.Address,
|
||||
Handler: router,
|
||||
Addr: cfg.Address,
|
||||
Handler: router,
|
||||
ReadHeaderTimeout: 5 * time.Second,
|
||||
}
|
||||
|
||||
ln, err := net.Listen("tcp", cfg.Address)
|
||||
ln, err := (&net.ListenConfig{}).Listen(context.Background(), "tcp", cfg.Address)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user