Rename unused parameters to _ to satisfy linter

This commit is contained in:
2026-01-08 02:27:45 -08:00
parent 146eeee070
commit 29adb6ee47
8 changed files with 11 additions and 11 deletions

View File

@@ -38,7 +38,7 @@ type Config struct {
}
// New creates a new Config instance by loading configuration from file.
func New(lc fx.Lifecycle, params Params) (*Config, error) {
func New(_ fx.Lifecycle, params Params) (*Config, error) {
log := params.Logger.Get()
name := params.Globals.Appname

View File

@@ -42,7 +42,7 @@ func New(lc fx.Lifecycle, params Params) (*Database, error) {
return s.connect(ctx)
},
OnStop: func(ctx context.Context) error {
OnStop: func(_ context.Context) error {
s.log.Info("Database OnStop Hook")
if s.db != nil {
return s.db.Close()

View File

@@ -20,7 +20,7 @@ type Globals struct {
}
// New creates a new Globals instance from build-time variables.
func New(lc fx.Lifecycle) (*Globals, error) {
func New(_ fx.Lifecycle) (*Globals, error) {
n := &Globals{
Appname: Appname,
Buildarch: Buildarch,

View File

@@ -33,7 +33,7 @@ func New(lc fx.Lifecycle, params Params) (*Handlers, error) {
}
lc.Append(fx.Hook{
OnStart: func(ctx context.Context) error {
OnStart: func(_ context.Context) error {
return nil
},
})

View File

@@ -7,7 +7,7 @@ import (
// HandleImage handles the main image proxy route:
// /v1/image/<host>/<path>/<width>x<height>.<format>
func (s *Handlers) HandleImage() http.HandlerFunc {
return func(w http.ResponseWriter, req *http.Request) {
return func(_ http.ResponseWriter, _ *http.Request) {
// FIXME: Implement image proxy handler
// - Parse URL to extract host, path, size, format
// - Validate signature and expiration
@@ -19,9 +19,9 @@ func (s *Handlers) HandleImage() http.HandlerFunc {
}
}
// HandleRobotsTxt serves robots.txt to prevent search engine crawling
// HandleRobotsTxt serves robots.txt to prevent search engine crawling.
func (s *Handlers) HandleRobotsTxt() http.HandlerFunc {
return func(w http.ResponseWriter, req *http.Request) {
return func(_ http.ResponseWriter, _ *http.Request) {
// FIXME: Implement robots.txt handler
panic("unimplemented")
}

View File

@@ -39,12 +39,12 @@ func New(lc fx.Lifecycle, params Params) (*Healthcheck, error) {
}
lc.Append(fx.Hook{
OnStart: func(ctx context.Context) error {
OnStart: func(_ context.Context) error {
s.StartupTime = time.Now()
return nil
},
OnStop: func(ctx context.Context) error {
OnStop: func(_ context.Context) error {
return nil
},
})

View File

@@ -23,7 +23,7 @@ type Logger struct {
}
// New creates a new Logger instance.
func New(lc fx.Lifecycle, params Params) (*Logger, error) {
func New(_ fx.Lifecycle, params Params) (*Logger, error) {
l := &Logger{
level: new(slog.LevelVar),
globals: params.Globals,

View File

@@ -35,7 +35,7 @@ type Middleware struct {
}
// New creates a new Middleware instance.
func New(lc fx.Lifecycle, params Params) (*Middleware, error) {
func New(_ fx.Lifecycle, params Params) (*Middleware, error) {
s := &Middleware{
log: params.Logger.Get(),
config: params.Config,