Skip to content

Commit

Permalink
Clean up imports.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tang8330 committed Aug 19, 2024
1 parent 61182c1 commit 0d3d85c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
12 changes: 7 additions & 5 deletions sources/mongo/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ package mongo
import (
"context"
"fmt"
"github.com/artie-labs/reader/config"
"github.com/artie-labs/reader/lib"
"github.com/artie-labs/reader/lib/iterator"
mongo2 "github.com/artie-labs/reader/lib/mongo"

"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/bson/primitive"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"

"github.com/artie-labs/reader/config"
"github.com/artie-labs/reader/lib"
"github.com/artie-labs/reader/lib/iterator"
mongoLib "github.com/artie-labs/reader/lib/mongo"
)

type snapshotIterator struct {
Expand Down Expand Up @@ -80,7 +82,7 @@ func (s *snapshotIterator) Next() ([]lib.RawMessage, error) {
return nil, fmt.Errorf("failed to decode document: %w", err)
}

mgoMsg, err := mongo2.ParseMessage(result, nil, "r")
mgoMsg, err := mongoLib.ParseMessage(result, nil, "r")
if err != nil {
return nil, fmt.Errorf("failed to parse message: %w", err)
}
Expand Down
4 changes: 2 additions & 2 deletions sources/mongo/streaming.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"encoding/base64"
"fmt"
mongo2 "github.com/artie-labs/reader/lib/mongo"
"log/slog"
"time"

Expand All @@ -15,6 +14,7 @@ import (
"github.com/artie-labs/reader/config"
"github.com/artie-labs/reader/lib"
"github.com/artie-labs/reader/lib/iterator"
mongoLib "github.com/artie-labs/reader/lib/mongo"
"github.com/artie-labs/reader/lib/persistedmap"
)

Expand Down Expand Up @@ -109,7 +109,7 @@ func (s *streaming) Next() ([]lib.RawMessage, error) {
return nil, fmt.Errorf("failed to decode change event: %w", err)
}

changeEvent, err := mongo2.NewChangeEvent(rawChangeEvent)
changeEvent, err := mongoLib.NewChangeEvent(rawChangeEvent)
if err != nil {
return nil, fmt.Errorf("failed to parse change event: %w", err)
}
Expand Down

0 comments on commit 0d3d85c

Please sign in to comment.