From cd01573e513d1e107affa4a85cec71c18dd30f3b Mon Sep 17 00:00:00 2001 From: sue445 Date: Sat, 13 Jul 2024 20:22:47 +0900 Subject: [PATCH] lint: Fix unused-parameter --- adapter/postgresql/adapter.go | 4 ++-- cmd/plant_erd-oracle/main.go | 2 +- cmd/plant_erd/main.go | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/adapter/postgresql/adapter.go b/adapter/postgresql/adapter.go index c4badbe..de23568 100644 --- a/adapter/postgresql/adapter.go +++ b/adapter/postgresql/adapter.go @@ -57,7 +57,7 @@ func (a *Adapter) GetTable(tableWithSchemaName string) (*db.Table, error) { Name: tableWithSchemaName, } - primaryKeyColumns, err := a.getPrimaryKeyColumns(tableName, schemaName) + primaryKeyColumns, err := a.getPrimaryKeyColumns(tableName) if err != nil { return nil, errors.WithStack(err) } @@ -101,7 +101,7 @@ func (a *Adapter) GetTable(tableWithSchemaName string) (*db.Table, error) { return &table, nil } -func (a *Adapter) getPrimaryKeyColumns(tableName string, schemaName string) (mapset.Set, error) { +func (a *Adapter) getPrimaryKeyColumns(tableName string) (mapset.Set, error) { var rows []primaryKeys err := a.db.Select(&rows, ` diff --git a/cmd/plant_erd-oracle/main.go b/cmd/plant_erd-oracle/main.go index 93ec7a4..0e15372 100644 --- a/cmd/plant_erd-oracle/main.go +++ b/cmd/plant_erd-oracle/main.go @@ -68,7 +68,7 @@ func main() { }, ) - app.Action = func(c *cli.Context) error { + app.Action = func(_ *cli.Context) error { adapter, close, err := oracle.NewAdapter(oracleConfig) if err != nil { diff --git a/cmd/plant_erd/main.go b/cmd/plant_erd/main.go index f95b49c..3554d92 100644 --- a/cmd/plant_erd/main.go +++ b/cmd/plant_erd/main.go @@ -53,7 +53,7 @@ func main() { Destination: &sqlite3Database, }, ), - Action: func(c *cli.Context) error { + Action: func(_ *cli.Context) error { adapter, close, err := sqlite3.NewAdapter(sqlite3Database) if err != nil { @@ -118,7 +118,7 @@ func main() { Value: "utf8_general_ci", }, ), - Action: func(c *cli.Context) error { + Action: func(_ *cli.Context) error { mysqlConfig.Net = "tcp" mysqlConfig.Addr = fmt.Sprintf("%s:%d", mysqlHost, mysqlPort) @@ -185,7 +185,7 @@ func main() { Value: "disable", }, ), - Action: func(c *cli.Context) error { + Action: func(_ *cli.Context) error { adapter, close, err := postgresql.NewAdapter(postgresqlConfig) if err != nil {