Skip to content

Commit

Permalink
go fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex committed Nov 10, 2023
1 parent 834ea32 commit 5800dc8
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions flow/activities/flowable.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ func (a *FlowableActivity) StartFlow(ctx context.Context,
for _, col := range v.Exclude {
exclude[col] = struct{}{}
}
tblNameMapping[v.SourceTableIdentifier] = model.NameAndExclude {
Name: v.DestinationTableIdentifier,
tblNameMapping[v.SourceTableIdentifier] = model.NameAndExclude{
Name: v.DestinationTableIdentifier,
Exclude: exclude,
}
}
Expand Down
6 changes: 3 additions & 3 deletions flow/connectors/postgres/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -782,10 +782,10 @@ func (c *PostgresConnector) SetupReplication(signal *SlotSignal, req *protos.Set
return fmt.Errorf("error checking for replication slot and publication: %w", err)
}

tableNameMapping := make(map[string]model.NameAndExclude);
tableNameMapping := make(map[string]model.NameAndExclude)
for k, v := range req.TableNameMapping {
tableNameMapping[k] = model.NameAndExclude {
Name: v,
tableNameMapping[k] = model.NameAndExclude{
Name: v,
Exclude: make(map[string]struct{}, 0),
}
}
Expand Down
2 changes: 1 addition & 1 deletion flow/model/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
)

type NameAndExclude struct {
Name string
Name string
Exclude map[string]struct{}
}

Expand Down
6 changes: 3 additions & 3 deletions flow/workflows/setup_flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,9 @@ func (s *SetupFlowExecution) fetchTableSchemaAndSetupNormalizedTables(
if mapping.SourceTableIdentifier == srcTableName {
if len(mapping.Exclude) != 0 {
tableSchema = &protos.TableSchema{
TableIdentifier: tableSchema.TableIdentifier,
Columns: maps.Clone(tableSchema.Columns),
PrimaryKeyColumns: tableSchema.PrimaryKeyColumns,
TableIdentifier: tableSchema.TableIdentifier,
Columns: maps.Clone(tableSchema.Columns),
PrimaryKeyColumns: tableSchema.PrimaryKeyColumns,
IsReplicaIdentityFull: tableSchema.IsReplicaIdentityFull,
}
for _, exclude := range mapping.Exclude {
Expand Down
2 changes: 1 addition & 1 deletion flow/workflows/snapshot_flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import (
"github.com/PeerDB-io/peer-flow/shared"
"github.com/google/uuid"
logrus "github.com/sirupsen/logrus"
"golang.org/x/exp/maps"
"go.temporal.io/sdk/log"
"go.temporal.io/sdk/temporal"
"go.temporal.io/sdk/workflow"
"golang.org/x/exp/maps"
)

type SnapshotFlowExecution struct {
Expand Down

0 comments on commit 5800dc8

Please sign in to comment.