Skip to content

Commit

Permalink
lint: Fix unused-parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
sue445 committed Jul 13, 2024
1 parent ad4ef3b commit cd01573
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions adapter/postgresql/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -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, `
Expand Down
2 changes: 1 addition & 1 deletion cmd/plant_erd-oracle/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions cmd/plant_erd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit cd01573

Please sign in to comment.