Skip to content

Commit

Permalink
Merge pull request #14 from PostHog/catch-errors-fix-only-params
Browse files Browse the repository at this point in the history
  • Loading branch information
Daesgar authored Oct 18, 2024
2 parents ebdb9e9 + d8def31 commit f4f5123
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ func main() {

dumpSchemaCmd.Flags().BoolVar(&noKafkas, "no-kafkas", false, "Don't dump Kafka tables")
dumpSchemaCmd.Flags().BoolVar(&noMatViews, "no-mat-views", false, "Don't dump materialized views")
dumpSchemaCmd.Flags().BoolVar(&noKafkas, "only-kafkas", false, "Dump only Kafka tables")
dumpSchemaCmd.Flags().BoolVar(&noMatViews, "only-mat-views", false, "Dump only materialized views")
dumpSchemaCmd.Flags().BoolVar(&onlyKafkas, "only-kafkas", false, "Dump only Kafka tables")
dumpSchemaCmd.Flags().BoolVar(&onlyMatViews, "only-mat-views", false, "Dump only materialized views")
cmd.AddCommand(dumpSchemaCmd)

var (
Expand Down
6 changes: 3 additions & 3 deletions schemas.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ func getDatabases(db *sql.DB) ([]string, error) {
databases = append(databases, name)
}

if rows.Err(); err != nil {
if err = rows.Err(); err != nil {
return []string{}, fmt.Errorf("getting databases: %v", err)
}

Expand All @@ -200,7 +200,7 @@ func getTables(db *sql.DB, dbName string) ([]string, error) {
tables = append(tables, name)
}

if rows.Err(); err != nil {
if err = rows.Err(); err != nil {
return []string{}, fmt.Errorf("getting tables for '%s': %v", dbName, err)
}

Expand All @@ -225,7 +225,7 @@ func getTablesByEngine(db *sql.DB, dbName string, engineFilter string) ([]string
}
}

if rows.Err(); err != nil {
if err =rows.Err(); err != nil {
return []string{}, fmt.Errorf("getting tables for '%s': %v", dbName, err)
}

Expand Down

0 comments on commit f4f5123

Please sign in to comment.