summaryrefslogtreecommitdiff
path: root/srv/src/cmd/import-posts
diff options
context:
space:
mode:
authorBrian Picciano <mediocregopher@gmail.com>2022-05-07 14:56:34 -0600
committerBrian Picciano <mediocregopher@gmail.com>2022-05-07 14:56:34 -0600
commit07806c694269f6226a0f42c9f2cfb8c7655afad9 (patch)
tree7ea36474ab384bc59daa405f5789071993fc0ccf /srv/src/cmd/import-posts
parent1495c78656c94396c35c5eef5838e2d0f5cce4bf (diff)
Move sql db out of post.NewStore, so it can be shared
Diffstat (limited to 'srv/src/cmd/import-posts')
-rw-r--r--srv/src/cmd/import-posts/main.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/srv/src/cmd/import-posts/main.go b/srv/src/cmd/import-posts/main.go
index 6a1e952..e4eb9e7 100644
--- a/srv/src/cmd/import-posts/main.go
+++ b/srv/src/cmd/import-posts/main.go
@@ -133,13 +133,13 @@ func main() {
logger.FatalString(ctx, "no paths given")
}
- postStore, err := post.NewStore(post.StoreParams{
- DataDir: dataDir,
- })
+ postDB, err := post.NewSQLDB(dataDir)
if err != nil {
- logger.Fatal(ctx, "initializing post store", err)
+ logger.Fatal(ctx, "initializing post sql db", err)
}
- defer postStore.Close()
+ defer postDB.Close()
+
+ postStore := post.NewStore(postDB)
for _, path := range *paths {