diff options
author | Brian Picciano <mediocregopher@gmail.com> | 2023-04-15 21:07:16 +0200 |
---|---|---|
committer | Brian Picciano <mediocregopher@gmail.com> | 2023-04-15 21:07:16 +0200 |
commit | 7872296b838f4d1b26c6a0a01d79d27fe5ab44cc (patch) | |
tree | 9487f5abb93d88ab3b52700d2b3002b7dda373d6 /src/cmd | |
parent | 68f3215df6e2e4f345076dd5b20b9bf5867353cf (diff) |
Move asset store into its own package
Diffstat (limited to 'src/cmd')
-rw-r--r-- | src/cmd/load-test-data/main.go | 3 | ||||
-rw-r--r-- | src/cmd/mediocre-blog/main.go | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/cmd/load-test-data/main.go b/src/cmd/load-test-data/main.go index 5ebee32..850b9fd 100644 --- a/src/cmd/load-test-data/main.go +++ b/src/cmd/load-test-data/main.go @@ -9,6 +9,7 @@ import ( cfgpkg "github.com/mediocregopher/blog.mediocregopher.com/srv/cfg" "github.com/mediocregopher/blog.mediocregopher.com/srv/post" + "github.com/mediocregopher/blog.mediocregopher.com/srv/post/asset" "github.com/mediocregopher/mediocre-go-lib/v2/mctx" "github.com/mediocregopher/mediocre-go-lib/v2/mlog" "gopkg.in/yaml.v3" @@ -99,7 +100,7 @@ func main() { } { - assetStore := post.NewAssetStore(postDB) + assetStore := asset.NewStore(postDB) setAsset := func(assetID, assetPath string) error { assetFullPath := filepath.Join(testDataDir, assetPath) diff --git a/src/cmd/mediocre-blog/main.go b/src/cmd/mediocre-blog/main.go index d8ba768..aff0f8e 100644 --- a/src/cmd/mediocre-blog/main.go +++ b/src/cmd/mediocre-blog/main.go @@ -13,6 +13,7 @@ import ( "github.com/mediocregopher/blog.mediocregopher.com/srv/http" "github.com/mediocregopher/blog.mediocregopher.com/srv/mailinglist" "github.com/mediocregopher/blog.mediocregopher.com/srv/post" + "github.com/mediocregopher/blog.mediocregopher.com/srv/post/asset" "github.com/mediocregopher/blog.mediocregopher.com/srv/pow" "github.com/mediocregopher/mediocre-go-lib/v2/mctx" "github.com/mediocregopher/mediocre-go-lib/v2/mlog" @@ -100,7 +101,7 @@ func main() { defer postSQLDB.Close() postStore := post.NewStore(postSQLDB) - postAssetStore := post.NewAssetStore(postSQLDB) + postAssetStore := asset.NewStore(postSQLDB) postDraftStore := post.NewDraftStore(postSQLDB) cache := cache.New(5000) |