From 0895de2f7ee09f259969db66f9bded2a539fdb37 Mon Sep 17 00:00:00 2001 From: Umputun Date: Tue, 12 May 2020 11:34:16 -0500 Subject: [PATCH] rename all packages from the legacy remark/ to remark42 --- .../_example/memory_store/accessor/admin.go | 2 +- .../memory_store/accessor/admin_test.go | 2 +- .../_example/memory_store/accessor/data.go | 4 +- .../memory_store/accessor/data_test.go | 4 +- .../_example/memory_store/accessor/image.go | 2 +- backend/_example/memory_store/go.mod | 6 +-- backend/_example/memory_store/go.sum | 14 +++++++ backend/_example/memory_store/main.go | 4 +- backend/_example/memory_store/server/admin.go | 2 +- .../memory_store/server/admin_test.go | 2 +- backend/_example/memory_store/server/data.go | 4 +- .../_example/memory_store/server/data_test.go | 4 +- .../memory_store/server/image_test.go | 2 +- backend/_example/memory_store/server/rpc.go | 6 +-- .../_example/memory_store/server/rpc_test.go | 2 +- backend/app/cmd/cleanup.go | 2 +- backend/app/cmd/cleanup_test.go | 2 +- backend/app/cmd/server.go | 22 +++++------ backend/app/main.go | 2 +- backend/app/migrator/disqus.go | 2 +- backend/app/migrator/disqus_test.go | 8 ++-- backend/app/migrator/migrator.go | 4 +- backend/app/migrator/migrator_test.go | 8 ++-- backend/app/migrator/native.go | 4 +- backend/app/migrator/native_test.go | 8 ++-- backend/app/migrator/wordpress.go | 2 +- backend/app/migrator/wordpress_test.go | 8 ++-- backend/app/notify/email.go | 2 +- backend/app/notify/email_test.go | 38 +++++++++---------- backend/app/notify/notify.go | 2 +- backend/app/notify/notify_test.go | 2 +- backend/app/notify/telegram_test.go | 2 +- backend/app/rest/api/admin.go | 6 +-- backend/app/rest/api/admin_test.go | 4 +- backend/app/rest/api/migrator.go | 4 +- backend/app/rest/api/migrator_test.go | 4 +- backend/app/rest/api/rest.go | 14 +++---- backend/app/rest/api/rest_private.go | 14 +++---- backend/app/rest/api/rest_private_test.go | 9 +++-- backend/app/rest/api/rest_public.go | 8 ++-- backend/app/rest/api/rest_public_test.go | 4 +- backend/app/rest/api/rest_test.go | 18 ++++----- backend/app/rest/api/rss.go | 4 +- backend/app/rest/api/rss_test.go | 2 +- backend/app/rest/httperrors.go | 2 +- backend/app/rest/httperrors_test.go | 6 +-- backend/app/rest/proxy/image.go | 4 +- backend/app/rest/proxy/image_test.go | 2 +- backend/app/rest/user.go | 2 +- backend/app/rest/user_test.go | 2 +- backend/app/store/engine/bolt.go | 2 +- backend/app/store/engine/bolt_test.go | 2 +- backend/app/store/engine/engine.go | 2 +- backend/app/store/engine/engine_mock.go | 6 ++- backend/app/store/engine/engine_test.go | 2 +- backend/app/store/engine/remote.go | 2 +- backend/app/store/engine/remote_test.go | 2 +- backend/app/store/image/image.go | 1 + backend/app/store/image/image_mock.go | 9 +++-- backend/app/store/service/service.go | 8 ++-- backend/app/store/service/service_test.go | 8 ++-- backend/app/store/service/tree.go | 2 +- backend/app/store/service/tree_test.go | 2 +- backend/go.mod | 2 +- 64 files changed, 179 insertions(+), 158 deletions(-) diff --git a/backend/_example/memory_store/accessor/admin.go b/backend/_example/memory_store/accessor/admin.go index 2e279076..a3437a99 100644 --- a/backend/_example/memory_store/accessor/admin.go +++ b/backend/_example/memory_store/accessor/admin.go @@ -10,7 +10,7 @@ import ( log "github.com/go-pkgz/lgr" "github.com/pkg/errors" - "github.com/umputun/remark/backend/app/store/admin" + "github.com/umputun/remark42/backend/app/store/admin" ) // MemAdmin implements admin.Store with memory backend diff --git a/backend/_example/memory_store/accessor/admin_test.go b/backend/_example/memory_store/accessor/admin_test.go index 3aedd629..7b127205 100644 --- a/backend/_example/memory_store/accessor/admin_test.go +++ b/backend/_example/memory_store/accessor/admin_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/umputun/remark/backend/app/store/admin" + "github.com/umputun/remark42/backend/app/store/admin" ) func TestMemAdmin_Get(t *testing.T) { diff --git a/backend/_example/memory_store/accessor/data.go b/backend/_example/memory_store/accessor/data.go index 290e9bba..6fcea040 100644 --- a/backend/_example/memory_store/accessor/data.go +++ b/backend/_example/memory_store/accessor/data.go @@ -14,8 +14,8 @@ import ( "github.com/pkg/errors" - "github.com/umputun/remark/backend/app/store" - "github.com/umputun/remark/backend/app/store/engine" + "github.com/umputun/remark42/backend/app/store" + "github.com/umputun/remark42/backend/app/store/engine" ) const lastLimit = 1000 diff --git a/backend/_example/memory_store/accessor/data_test.go b/backend/_example/memory_store/accessor/data_test.go index fa24036d..2aec845a 100644 --- a/backend/_example/memory_store/accessor/data_test.go +++ b/backend/_example/memory_store/accessor/data_test.go @@ -15,8 +15,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/umputun/remark/backend/app/store" - "github.com/umputun/remark/backend/app/store/engine" + "github.com/umputun/remark42/backend/app/store" + "github.com/umputun/remark42/backend/app/store/engine" ) func TestMemData_CreateAndFind(t *testing.T) { diff --git a/backend/_example/memory_store/accessor/image.go b/backend/_example/memory_store/accessor/image.go index e667ec9b..2a922766 100644 --- a/backend/_example/memory_store/accessor/image.go +++ b/backend/_example/memory_store/accessor/image.go @@ -14,7 +14,7 @@ import ( log "github.com/go-pkgz/lgr" "github.com/pkg/errors" - "github.com/umputun/remark/backend/app/store/image" + "github.com/umputun/remark42/backend/app/store/image" ) // MemImage implements image.Store with memory backend diff --git a/backend/_example/memory_store/go.mod b/backend/_example/memory_store/go.mod index aa2e9cfc..9202a46e 100644 --- a/backend/_example/memory_store/go.mod +++ b/backend/_example/memory_store/go.mod @@ -1,4 +1,4 @@ -module github.com/umputun/remark/memory_store +module github.com/umputun/remark42/memory_store go 1.14 @@ -8,7 +8,7 @@ require ( github.com/pkg/errors v0.9.1 github.com/stretchr/testify v1.5.1 github.com/umputun/go-flags v1.5.1 - github.com/umputun/remark/backend v1.5.0 + github.com/umputun/remark42/backend v1.6.0 ) -replace github.com/umputun/remark/backend => ../../ +replace github.com/umputun/remark42/backend => ../../ diff --git a/backend/_example/memory_store/go.sum b/backend/_example/memory_store/go.sum index a4e97499..0eb51ed8 100644 --- a/backend/_example/memory_store/go.sum +++ b/backend/_example/memory_store/go.sum @@ -22,6 +22,7 @@ github.com/alecthomas/repr v0.0.0-20181024024818-d37bc2a10ba1 h1:GDQdwm/gAcJcLAK github.com/alecthomas/repr v0.0.0-20181024024818-d37bc2a10ba1/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ= github.com/alicebob/gopher-json v0.0.0-20180125190556-5a6b3ba71ee6/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc= github.com/alicebob/miniredis v2.5.0+incompatible/go.mod h1:8HZjEj4yU0dwhYHky+DxYx+6BMjkBbe5ONFIF1MXffk= +github.com/alicebob/miniredis/v2 v2.11.4/go.mod h1:VL3UDEfAH59bSa7MuHMuFToxkqyHh69s/WUbYlOAuyg= github.com/andybalholm/cascadia v1.1.0 h1:BuuO6sSfQNFRu1LppgbD25Hr2vLYW25JvxHs5zzsLTo= github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= @@ -56,6 +57,7 @@ github.com/go-pkgz/auth v0.10.1/go.mod h1:wxyQqc0UUP1jT4l6zk1r6XPcVdcgIzW2OiQ8hB github.com/go-pkgz/jrpc v0.1.0 h1:hNg/IyfEqJcSWOKkuHw0ZwcuGc9TDp7QZREsD2ycmiM= github.com/go-pkgz/jrpc v0.1.0/go.mod h1:JxZsvoBklA50DNhELVJnJ567Rt+KrMH9rR3u515wvE8= github.com/go-pkgz/lcw v0.5.0/go.mod h1:CSdQRQthxJQ4iDD4wTPPuWFbFdknJzwJ8WXu1nfxb10= +github.com/go-pkgz/lcw v0.5.1-0.20200509170726-dc283cfc28cf/go.mod h1:vovP88gZLeuIWn5cm0NlgPYFyGGkv3m2OcKMOOaHhj0= github.com/go-pkgz/lgr v0.7.0 h1:S/AAPwt/RE9a5mNJskA7dGVp+Dq6SMIW6LYjG3ITxY8= github.com/go-pkgz/lgr v0.7.0/go.mod h1:yMgxU+GobMRJgIEbSzDKy/67W18S7qmGx/7BVL5AB8Q= github.com/go-pkgz/repeater v1.1.3/go.mod h1:hVTavuO5x3Gxnu8zW7d6sQBfAneKV8X2FjU48kGfpKw= @@ -65,6 +67,7 @@ github.com/go-pkgz/rest v1.5.0 h1:C8SxXcXza4GiUUAn/95iCkvoIrGbS30qpwK19iqlrWQ= github.com/go-pkgz/rest v1.5.0/go.mod h1:nQaM3RhSTUAmbBZWY4hfe4buyeC9VckvhoCktiQXJxI= github.com/go-pkgz/syncs v1.1.1/go.mod h1:bt9lxWRRJ9vOCMGc8Big8ttjYHLKP88ofj1y38UlaHE= github.com/go-redis/redis/v7 v7.0.0-beta.4/go.mod h1:xhhSbUMTsleRPur+Vgx9sUHtyN33bdjxY+9/0n9Ig8s= +github.com/go-redis/redis/v7 v7.2.0/go.mod h1:JDNMw23GTyLNC4GZu9njt15ctBQVn7xjRfnwdHj/Dcg= github.com/go-session/session v3.1.2+incompatible/go.mod h1:8B3iivBQjrz/JtC68Np2T1yBBLxTan3mn/3OM0CyRt0= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -74,6 +77,7 @@ github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/gomodule/redigo v1.7.1-0.20190322064113-39e2c31b7ca3/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -94,6 +98,7 @@ github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= @@ -118,8 +123,10 @@ github.com/nullrocks/identicon v0.0.0-20180626043057-7875f45b0022/go.mod h1:x4Ns github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -157,6 +164,7 @@ github.com/tidwall/rtree v0.0.0-20180113144539-6cd427091e0e/go.mod h1:/h+UnNGt0I github.com/tidwall/tinyqueue v0.0.0-20180302190814-1e39f5511563/go.mod h1:mLqSmt7Dv/CNneF2wfcChfN1rvapyQr01LGKnKex0DQ= github.com/umputun/go-flags v1.5.1 h1:vRauoXV3Ultt1HrxivSxowbintgZLJE+EcBy5ta3/mY= github.com/umputun/go-flags v1.5.1/go.mod h1:nTbvsO/hKqe7Utri/NoyN18GR3+EWf+9RrmsdwdhrEc= +github.com/umputun/remark42 v1.6.0 h1:MjonGcjKAYeMfWGhYhVDa8mol0rRg1IrhYmDoOTRhFI= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v1.0.0/go.mod h1:4vX61m6KN+xDduDNwXrhIAVZaZaZiQ1luJk8LWSxF3s= github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= @@ -170,6 +178,7 @@ github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FB github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/gopher-lua v0.0.0-20190514113301-1cd887cd7036/go.mod h1:gqRgreBUhTSL0GeU64rtZ3Uq3wtjOa/TB2YfrtkCbVQ= +github.com/yuin/gopher-lua v0.0.0-20191220021717-ab39c6098bdb/go.mod h1:gqRgreBUhTSL0GeU64rtZ3Uq3wtjOa/TB2YfrtkCbVQ= go.etcd.io/bbolt v1.3.4 h1:hi1bXHMVrlQh6WwxAy+qZCV/SYIlqo+Ushwdpa4tAKg= go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= @@ -203,6 +212,7 @@ golang.org/x/net v0.0.0-20190611141213-3f473d35a33a/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80 h1:Ao/3l156eZf2AW5wK8a7/smtodRU+gha3+BeqJ69lRk= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2 h1:CCH4IOTTfewWjGOlSp+zGcjutRKlBEZQ6wTn8ozI/nI= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -223,6 +233,7 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5 h1:LfCXLvNmTYH9kEmVgqbnsWfruoXZIrh4YBgqVHtDvw0= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= @@ -257,12 +268,15 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/oauth2.v3 v3.10.1/go.mod h1:nTG+m2PRcHR9jzGNrGdxSsUKz7vvwkqSlhFrstgZcRU= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/backend/_example/memory_store/main.go b/backend/_example/memory_store/main.go index 67def3e0..180e607e 100644 --- a/backend/_example/memory_store/main.go +++ b/backend/_example/memory_store/main.go @@ -14,8 +14,8 @@ import ( log "github.com/go-pkgz/lgr" "github.com/umputun/go-flags" - "github.com/umputun/remark/memory_store/accessor" - "github.com/umputun/remark/memory_store/server" + "github.com/umputun/remark42/memory_store/accessor" + "github.com/umputun/remark42/memory_store/server" ) // opts with all cli commands and flags diff --git a/backend/_example/memory_store/server/admin.go b/backend/_example/memory_store/server/admin.go index ae7da062..717cf437 100644 --- a/backend/_example/memory_store/server/admin.go +++ b/backend/_example/memory_store/server/admin.go @@ -11,7 +11,7 @@ import ( "github.com/go-pkgz/jrpc" - "github.com/umputun/remark/backend/app/store/admin" + "github.com/umputun/remark42/backend/app/store/admin" ) // get admin key diff --git a/backend/_example/memory_store/server/admin_test.go b/backend/_example/memory_store/server/admin_test.go index 380fa00c..ad4196b5 100644 --- a/backend/_example/memory_store/server/admin_test.go +++ b/backend/_example/memory_store/server/admin_test.go @@ -15,7 +15,7 @@ import ( "github.com/go-pkgz/jrpc" "github.com/stretchr/testify/assert" - "github.com/umputun/remark/backend/app/store/admin" + "github.com/umputun/remark42/backend/app/store/admin" ) func TestRPC_admKeyHndl(t *testing.T) { diff --git a/backend/_example/memory_store/server/data.go b/backend/_example/memory_store/server/data.go index bc92d39a..d879b178 100644 --- a/backend/_example/memory_store/server/data.go +++ b/backend/_example/memory_store/server/data.go @@ -11,8 +11,8 @@ import ( "github.com/go-pkgz/jrpc" - "github.com/umputun/remark/backend/app/store" - "github.com/umputun/remark/backend/app/store/engine" + "github.com/umputun/remark42/backend/app/store" + "github.com/umputun/remark42/backend/app/store/engine" ) func (s *RPC) createHndl(id uint64, params json.RawMessage) (rr jrpc.Response) { diff --git a/backend/_example/memory_store/server/data_test.go b/backend/_example/memory_store/server/data_test.go index baefa27b..d99177fd 100644 --- a/backend/_example/memory_store/server/data_test.go +++ b/backend/_example/memory_store/server/data_test.go @@ -16,8 +16,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/umputun/remark/backend/app/store" - "github.com/umputun/remark/backend/app/store/engine" + "github.com/umputun/remark42/backend/app/store" + "github.com/umputun/remark42/backend/app/store/engine" ) func TestRPC_createHndl(t *testing.T) { diff --git a/backend/_example/memory_store/server/image_test.go b/backend/_example/memory_store/server/image_test.go index 0a5ea027..96446098 100644 --- a/backend/_example/memory_store/server/image_test.go +++ b/backend/_example/memory_store/server/image_test.go @@ -20,7 +20,7 @@ import ( "github.com/go-pkgz/jrpc" "github.com/stretchr/testify/assert" - "github.com/umputun/remark/backend/app/store/image" + "github.com/umputun/remark42/backend/app/store/image" ) // gopher png for test, from https://golang.org/src/image/png/example_test.go diff --git a/backend/_example/memory_store/server/rpc.go b/backend/_example/memory_store/server/rpc.go index 07609e7d..1b7dc55c 100644 --- a/backend/_example/memory_store/server/rpc.go +++ b/backend/_example/memory_store/server/rpc.go @@ -9,9 +9,9 @@ package server import ( "github.com/go-pkgz/jrpc" - "github.com/umputun/remark/backend/app/store/admin" - "github.com/umputun/remark/backend/app/store/engine" - "github.com/umputun/remark/backend/app/store/image" + "github.com/umputun/remark42/backend/app/store/admin" + "github.com/umputun/remark42/backend/app/store/engine" + "github.com/umputun/remark42/backend/app/store/image" ) // RPC handler wraps both engine and remote server and implements all handlers for data store and admin store diff --git a/backend/_example/memory_store/server/rpc_test.go b/backend/_example/memory_store/server/rpc_test.go index d8cb9ca2..3503e6a1 100644 --- a/backend/_example/memory_store/server/rpc_test.go +++ b/backend/_example/memory_store/server/rpc_test.go @@ -17,7 +17,7 @@ import ( "github.com/go-pkgz/jrpc" "github.com/stretchr/testify/require" - "github.com/umputun/remark/memory_store/accessor" + "github.com/umputun/remark42/memory_store/accessor" ) func chooseRandomUnusedPort() (port int) { diff --git a/backend/app/cmd/cleanup.go b/backend/app/cmd/cleanup.go index c69897c1..3a05b09c 100644 --- a/backend/app/cmd/cleanup.go +++ b/backend/app/cmd/cleanup.go @@ -11,7 +11,7 @@ import ( log "github.com/go-pkgz/lgr" "github.com/pkg/errors" - "github.com/umputun/remark/backend/app/store" + "github.com/umputun/remark42/backend/app/store" ) // CleanupCommand set of flags and command for cleanup diff --git a/backend/app/cmd/cleanup_test.go b/backend/app/cmd/cleanup_test.go index 5335c8d0..e6b23cd1 100644 --- a/backend/app/cmd/cleanup_test.go +++ b/backend/app/cmd/cleanup_test.go @@ -14,7 +14,7 @@ import ( "github.com/stretchr/testify/require" "github.com/umputun/go-flags" - "github.com/umputun/remark/backend/app/store" + "github.com/umputun/remark42/backend/app/store" ) type cleanedComments struct { diff --git a/backend/app/cmd/server.go b/backend/app/cmd/server.go index 0e6776fa..d568c2a8 100644 --- a/backend/app/cmd/server.go +++ b/backend/app/cmd/server.go @@ -1,9 +1,9 @@ package cmd import ( - "io/ioutil" "context" "fmt" + "io/ioutil" "net/http" "net/url" "os" @@ -28,16 +28,16 @@ import ( "github.com/go-pkgz/auth/token" cache "github.com/go-pkgz/lcw" - "github.com/umputun/remark/backend/app/migrator" - "github.com/umputun/remark/backend/app/notify" - "github.com/umputun/remark/backend/app/rest/api" - "github.com/umputun/remark/backend/app/rest/proxy" - "github.com/umputun/remark/backend/app/store" - "github.com/umputun/remark/backend/app/store/admin" - "github.com/umputun/remark/backend/app/store/engine" - "github.com/umputun/remark/backend/app/store/image" - "github.com/umputun/remark/backend/app/store/service" - "github.com/umputun/remark/backend/app/templates" + "github.com/umputun/remark42/backend/app/migrator" + "github.com/umputun/remark42/backend/app/notify" + "github.com/umputun/remark42/backend/app/rest/api" + "github.com/umputun/remark42/backend/app/rest/proxy" + "github.com/umputun/remark42/backend/app/store" + "github.com/umputun/remark42/backend/app/store/admin" + "github.com/umputun/remark42/backend/app/store/engine" + "github.com/umputun/remark42/backend/app/store/image" + "github.com/umputun/remark42/backend/app/store/service" + "github.com/umputun/remark42/backend/app/templates" ) // ServerCommand with command line flags and env diff --git a/backend/app/main.go b/backend/app/main.go index 98445595..8656d3b9 100644 --- a/backend/app/main.go +++ b/backend/app/main.go @@ -10,7 +10,7 @@ import ( log "github.com/go-pkgz/lgr" "github.com/umputun/go-flags" - "github.com/umputun/remark/backend/app/cmd" + "github.com/umputun/remark42/backend/app/cmd" ) // Opts with all cli commands and flags diff --git a/backend/app/migrator/disqus.go b/backend/app/migrator/disqus.go index dabefd54..a9e1d8eb 100644 --- a/backend/app/migrator/disqus.go +++ b/backend/app/migrator/disqus.go @@ -9,7 +9,7 @@ import ( log "github.com/go-pkgz/lgr" "github.com/pkg/errors" - "github.com/umputun/remark/backend/app/store" + "github.com/umputun/remark42/backend/app/store" ) // Disqus implements Importer from disqus xml diff --git a/backend/app/migrator/disqus_test.go b/backend/app/migrator/disqus_test.go index 7a31c590..3eaaba05 100644 --- a/backend/app/migrator/disqus_test.go +++ b/backend/app/migrator/disqus_test.go @@ -10,10 +10,10 @@ import ( "github.com/stretchr/testify/require" bolt "go.etcd.io/bbolt" - "github.com/umputun/remark/backend/app/store" - "github.com/umputun/remark/backend/app/store/admin" - "github.com/umputun/remark/backend/app/store/engine" - "github.com/umputun/remark/backend/app/store/service" + "github.com/umputun/remark42/backend/app/store" + "github.com/umputun/remark42/backend/app/store/admin" + "github.com/umputun/remark42/backend/app/store/engine" + "github.com/umputun/remark42/backend/app/store/service" ) func TestDisqus_Import(t *testing.T) { diff --git a/backend/app/migrator/migrator.go b/backend/app/migrator/migrator.go index 0d7dd4d7..fa3c6262 100644 --- a/backend/app/migrator/migrator.go +++ b/backend/app/migrator/migrator.go @@ -10,8 +10,8 @@ import ( log "github.com/go-pkgz/lgr" "github.com/pkg/errors" - "github.com/umputun/remark/backend/app/store" - "github.com/umputun/remark/backend/app/store/service" + "github.com/umputun/remark42/backend/app/store" + "github.com/umputun/remark42/backend/app/store/service" ) // Importer defines interface to convert posts from external sources diff --git a/backend/app/migrator/migrator_test.go b/backend/app/migrator/migrator_test.go index 3c1a19a5..71c86d8d 100644 --- a/backend/app/migrator/migrator_test.go +++ b/backend/app/migrator/migrator_test.go @@ -10,10 +10,10 @@ import ( "github.com/stretchr/testify/require" bolt "go.etcd.io/bbolt" - "github.com/umputun/remark/backend/app/store" - "github.com/umputun/remark/backend/app/store/admin" - "github.com/umputun/remark/backend/app/store/engine" - "github.com/umputun/remark/backend/app/store/service" + "github.com/umputun/remark42/backend/app/store" + "github.com/umputun/remark42/backend/app/store/admin" + "github.com/umputun/remark42/backend/app/store/engine" + "github.com/umputun/remark42/backend/app/store/service" ) func TestMigrator_ImportDisqus(t *testing.T) { diff --git a/backend/app/migrator/native.go b/backend/app/migrator/native.go index f0d329b3..b086a360 100644 --- a/backend/app/migrator/native.go +++ b/backend/app/migrator/native.go @@ -11,8 +11,8 @@ import ( "github.com/go-pkgz/syncs" "github.com/pkg/errors" - "github.com/umputun/remark/backend/app/store" - "github.com/umputun/remark/backend/app/store/service" + "github.com/umputun/remark42/backend/app/store" + "github.com/umputun/remark42/backend/app/store/service" ) const nativeVersion = 1 diff --git a/backend/app/migrator/native_test.go b/backend/app/migrator/native_test.go index 0b41ef67..45b3adde 100644 --- a/backend/app/migrator/native_test.go +++ b/backend/app/migrator/native_test.go @@ -14,10 +14,10 @@ import ( "github.com/stretchr/testify/require" bolt "go.etcd.io/bbolt" - "github.com/umputun/remark/backend/app/store" - "github.com/umputun/remark/backend/app/store/admin" - "github.com/umputun/remark/backend/app/store/engine" - "github.com/umputun/remark/backend/app/store/service" + "github.com/umputun/remark42/backend/app/store" + "github.com/umputun/remark42/backend/app/store/admin" + "github.com/umputun/remark42/backend/app/store/engine" + "github.com/umputun/remark42/backend/app/store/service" ) func TestNative_Export(t *testing.T) { diff --git a/backend/app/migrator/wordpress.go b/backend/app/migrator/wordpress.go index 689e633e..c2872e15 100644 --- a/backend/app/migrator/wordpress.go +++ b/backend/app/migrator/wordpress.go @@ -9,7 +9,7 @@ import ( log "github.com/go-pkgz/lgr" "github.com/pkg/errors" - "github.com/umputun/remark/backend/app/store" + "github.com/umputun/remark42/backend/app/store" ) const wpTimeLayout = "2006-01-02 15:04:05" diff --git a/backend/app/migrator/wordpress_test.go b/backend/app/migrator/wordpress_test.go index e3cf497c..659842d6 100644 --- a/backend/app/migrator/wordpress_test.go +++ b/backend/app/migrator/wordpress_test.go @@ -10,10 +10,10 @@ import ( "github.com/stretchr/testify/require" bolt "go.etcd.io/bbolt" - "github.com/umputun/remark/backend/app/store" - "github.com/umputun/remark/backend/app/store/admin" - "github.com/umputun/remark/backend/app/store/engine" - "github.com/umputun/remark/backend/app/store/service" + "github.com/umputun/remark42/backend/app/store" + "github.com/umputun/remark42/backend/app/store/admin" + "github.com/umputun/remark42/backend/app/store/engine" + "github.com/umputun/remark42/backend/app/store/service" ) func TestWordPress_Import(t *testing.T) { diff --git a/backend/app/notify/email.go b/backend/app/notify/email.go index a8daf008..89fd292a 100644 --- a/backend/app/notify/email.go +++ b/backend/app/notify/email.go @@ -16,7 +16,7 @@ import ( "github.com/go-pkgz/repeater" "github.com/pkg/errors" - "github.com/umputun/remark/backend/app/templates" + "github.com/umputun/remark42/backend/app/templates" ) // EmailParams contain settings for email notifications diff --git a/backend/app/notify/email_test.go b/backend/app/notify/email_test.go index b12e10e6..133238f9 100644 --- a/backend/app/notify/email_test.go +++ b/backend/app/notify/email_test.go @@ -13,14 +13,14 @@ import ( "github.com/stretchr/testify/assert" - "github.com/umputun/remark/backend/app/store" + "github.com/umputun/remark42/backend/app/store" ) func TestEmailNew(t *testing.T) { emailParams := EmailParams{ - From: "test@from", + From: "test@from", VerificationTemplatePath: "testdata/verification.html.tmpl", - MsgTemplatePath: "testdata/msg.html.tmpl", + MsgTemplatePath: "testdata/msg.html.tmpl", } smtpParams := SMTPParams{ Host: "test@host", @@ -51,41 +51,41 @@ func TestEmailNew(t *testing.T) { } func Test_initTemplates(t *testing.T) { - testSet := []struct{ - name string - errText string + testSet := []struct { + name string + errText string emailParams EmailParams }{ { - name: "with wrong path to verification template", + name: "with wrong path to verification template", errText: "can't read verification template: open notfount.tmpl: no such file or directory", emailParams: EmailParams{ VerificationTemplatePath: "notfount.tmpl", - MsgTemplatePath: "testdata/msg.html.tmpl", + MsgTemplatePath: "testdata/msg.html.tmpl", }, }, { - name: "with wrong path to message template", + name: "with wrong path to message template", errText: "can't read message template: open notfount.tmpl: no such file or directory", emailParams: EmailParams{ VerificationTemplatePath: "testdata/verification.html.tmpl", - MsgTemplatePath: "notfount.tmpl", + MsgTemplatePath: "notfount.tmpl", }, }, { - name: "with error on read verification template", + name: "with error on read verification template", errText: "can't parse verification template: template: verifyTmpl:1: unexpected unclosed action in command", emailParams: EmailParams{ VerificationTemplatePath: "testdata/bad.html.tmpl", - MsgTemplatePath: "testdata/msg.html.tmpl", + MsgTemplatePath: "testdata/msg.html.tmpl", }, }, { - name: "with error on read message template", + name: "with error on read message template", errText: "can't parse message template: template: msgTmpl:1: unexpected unclosed action in command", emailParams: EmailParams{ VerificationTemplatePath: "testdata/verification.html.tmpl", - MsgTemplatePath: "testdata/bad.html.tmpl", + MsgTemplatePath: "testdata/bad.html.tmpl", }, }, } @@ -129,7 +129,7 @@ func TestEmailSendErrors(t *testing.T) { func TestEmailSend_ExitConditions(t *testing.T) { email, err := NewEmail(EmailParams{ VerificationTemplatePath: "testdata/verification.html.tmpl", - MsgTemplatePath: "testdata/msg.html.tmpl", + MsgTemplatePath: "testdata/msg.html.tmpl", }, SMTPParams{}) assert.NoError(t, err) assert.NotNil(t, email, "expecting email returned") @@ -186,9 +186,9 @@ func TestEmailSendClientError(t *testing.T) { func TestEmail_Send(t *testing.T) { email, err := NewEmail(EmailParams{ - From: "from@example.org", + From: "from@example.org", VerificationTemplatePath: "testdata/verification.html.tmpl", - MsgTemplatePath: "testdata/msg.html.tmpl", + MsgTemplatePath: "testdata/msg.html.tmpl", }, SMTPParams{}) assert.NoError(t, err) assert.NotNil(t, email) @@ -238,9 +238,9 @@ Date: `) func TestEmail_SendVerification(t *testing.T) { email, err := NewEmail(EmailParams{ - From: "from@example.org", + From: "from@example.org", VerificationTemplatePath: "testdata/verification.html.tmpl", - MsgTemplatePath: "testdata/msg.html.tmpl", + MsgTemplatePath: "testdata/msg.html.tmpl", }, SMTPParams{}) assert.NoError(t, err) assert.NotNil(t, email) diff --git a/backend/app/notify/notify.go b/backend/app/notify/notify.go index d8019908..aec910d0 100644 --- a/backend/app/notify/notify.go +++ b/backend/app/notify/notify.go @@ -9,7 +9,7 @@ import ( log "github.com/go-pkgz/lgr" - "github.com/umputun/remark/backend/app/store" + "github.com/umputun/remark42/backend/app/store" ) // Service delivers notifications to multiple destinations diff --git a/backend/app/notify/notify_test.go b/backend/app/notify/notify_test.go index 93a1d562..10c097fb 100644 --- a/backend/app/notify/notify_test.go +++ b/backend/app/notify/notify_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/umputun/remark/backend/app/store" + "github.com/umputun/remark42/backend/app/store" ) func TestService_NoDestinations(t *testing.T) { diff --git a/backend/app/notify/telegram_test.go b/backend/app/notify/telegram_test.go index 7532b5ed..8660ab57 100644 --- a/backend/app/notify/telegram_test.go +++ b/backend/app/notify/telegram_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/umputun/remark/backend/app/store" + "github.com/umputun/remark42/backend/app/store" ) func TestTelegram_New(t *testing.T) { diff --git a/backend/app/rest/api/admin.go b/backend/app/rest/api/admin.go index a2ad900b..3c6e9192 100644 --- a/backend/app/rest/api/admin.go +++ b/backend/app/rest/api/admin.go @@ -13,9 +13,9 @@ import ( log "github.com/go-pkgz/lgr" R "github.com/go-pkgz/rest" - "github.com/umputun/remark/backend/app/rest" - "github.com/umputun/remark/backend/app/store" - "github.com/umputun/remark/backend/app/store/engine" + "github.com/umputun/remark42/backend/app/rest" + "github.com/umputun/remark42/backend/app/store" + "github.com/umputun/remark42/backend/app/store/engine" ) // admin provides router for all requests available for admin users only diff --git a/backend/app/rest/api/admin_test.go b/backend/app/rest/api/admin_test.go index 358940e2..49f1b374 100644 --- a/backend/app/rest/api/admin_test.go +++ b/backend/app/rest/api/admin_test.go @@ -21,8 +21,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/umputun/remark/backend/app/store" - "github.com/umputun/remark/backend/app/store/service" + "github.com/umputun/remark42/backend/app/store" + "github.com/umputun/remark42/backend/app/store/service" ) func TestAdmin_Delete(t *testing.T) { diff --git a/backend/app/rest/api/migrator.go b/backend/app/rest/api/migrator.go index c1334424..d99bc491 100644 --- a/backend/app/rest/api/migrator.go +++ b/backend/app/rest/api/migrator.go @@ -17,8 +17,8 @@ import ( R "github.com/go-pkgz/rest" "github.com/pkg/errors" - "github.com/umputun/remark/backend/app/migrator" - "github.com/umputun/remark/backend/app/rest" + "github.com/umputun/remark42/backend/app/migrator" + "github.com/umputun/remark42/backend/app/rest" ) // Migrator rest with import and export controllers diff --git a/backend/app/rest/api/migrator_test.go b/backend/app/rest/api/migrator_test.go index e39f07ab..d5c7b6e3 100644 --- a/backend/app/rest/api/migrator_test.go +++ b/backend/app/rest/api/migrator_test.go @@ -17,8 +17,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/umputun/remark/backend/app/store" - "github.com/umputun/remark/backend/app/store/service" + "github.com/umputun/remark42/backend/app/store" + "github.com/umputun/remark42/backend/app/store/service" ) func TestMigrator_Import(t *testing.T) { diff --git a/backend/app/rest/api/rest.go b/backend/app/rest/api/rest.go index 02b9b064..8189abf8 100644 --- a/backend/app/rest/api/rest.go +++ b/backend/app/rest/api/rest.go @@ -25,13 +25,13 @@ import ( "github.com/pkg/errors" "github.com/rakyll/statik/fs" - "github.com/umputun/remark/backend/app/notify" - "github.com/umputun/remark/backend/app/rest" - "github.com/umputun/remark/backend/app/rest/proxy" - "github.com/umputun/remark/backend/app/store" - "github.com/umputun/remark/backend/app/store/image" - "github.com/umputun/remark/backend/app/store/service" - "github.com/umputun/remark/backend/app/templates" + "github.com/umputun/remark42/backend/app/notify" + "github.com/umputun/remark42/backend/app/rest" + "github.com/umputun/remark42/backend/app/rest/proxy" + "github.com/umputun/remark42/backend/app/store" + "github.com/umputun/remark42/backend/app/store/image" + "github.com/umputun/remark42/backend/app/store/service" + "github.com/umputun/remark42/backend/app/templates" ) // Rest is a rest access server diff --git a/backend/app/rest/api/rest_private.go b/backend/app/rest/api/rest_private.go index a0cd5d82..808b778a 100644 --- a/backend/app/rest/api/rest_private.go +++ b/backend/app/rest/api/rest_private.go @@ -22,13 +22,13 @@ import ( R "github.com/go-pkgz/rest" "github.com/hashicorp/go-multierror" - "github.com/umputun/remark/backend/app/notify" - "github.com/umputun/remark/backend/app/rest" - "github.com/umputun/remark/backend/app/store" - "github.com/umputun/remark/backend/app/store/engine" - "github.com/umputun/remark/backend/app/store/image" - "github.com/umputun/remark/backend/app/store/service" - "github.com/umputun/remark/backend/app/templates" + "github.com/umputun/remark42/backend/app/notify" + "github.com/umputun/remark42/backend/app/rest" + "github.com/umputun/remark42/backend/app/store" + "github.com/umputun/remark42/backend/app/store/engine" + "github.com/umputun/remark42/backend/app/store/image" + "github.com/umputun/remark42/backend/app/store/service" + "github.com/umputun/remark42/backend/app/templates" ) type private struct { diff --git a/backend/app/rest/api/rest_private_test.go b/backend/app/rest/api/rest_private_test.go index a8be4cd5..4cfc6c05 100644 --- a/backend/app/rest/api/rest_private_test.go +++ b/backend/app/rest/api/rest_private_test.go @@ -23,9 +23,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/umputun/remark/backend/app/notify" - "github.com/umputun/remark/backend/app/store" - "github.com/umputun/remark/backend/app/store/image" + "github.com/umputun/remark42/backend/app/notify" + "github.com/umputun/remark42/backend/app/store" + "github.com/umputun/remark42/backend/app/store/image" ) // gopher png for test, from https://golang.org/src/image/png/example_test.go @@ -503,7 +503,8 @@ func TestRest_AnonVote(t *testing.T) { assert.Equal(t, map[string]bool(nil), cr.Votes) } -type MockFS struct {} +type MockFS struct{} + func (fs *MockFS) ReadFile(path string) ([]byte, error) { return []byte(fmt.Sprintf("template %s", path)), nil } diff --git a/backend/app/rest/api/rest_public.go b/backend/app/rest/api/rest_public.go index a60e0bff..103bb657 100644 --- a/backend/app/rest/api/rest_public.go +++ b/backend/app/rest/api/rest_public.go @@ -19,10 +19,10 @@ import ( R "github.com/go-pkgz/rest" "github.com/pkg/errors" - "github.com/umputun/remark/backend/app/rest" - "github.com/umputun/remark/backend/app/store" - "github.com/umputun/remark/backend/app/store/image" - "github.com/umputun/remark/backend/app/store/service" + "github.com/umputun/remark42/backend/app/rest" + "github.com/umputun/remark42/backend/app/store" + "github.com/umputun/remark42/backend/app/store/image" + "github.com/umputun/remark42/backend/app/store/service" ) type public struct { diff --git a/backend/app/rest/api/rest_public_test.go b/backend/app/rest/api/rest_public_test.go index b7ee79ce..35341d40 100644 --- a/backend/app/rest/api/rest_public_test.go +++ b/backend/app/rest/api/rest_public_test.go @@ -17,8 +17,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/umputun/remark/backend/app/store" - "github.com/umputun/remark/backend/app/store/service" + "github.com/umputun/remark42/backend/app/store" + "github.com/umputun/remark42/backend/app/store/service" ) func TestRest_Ping(t *testing.T) { diff --git a/backend/app/rest/api/rest_test.go b/backend/app/rest/api/rest_test.go index 3193a761..09599e3b 100644 --- a/backend/app/rest/api/rest_test.go +++ b/backend/app/rest/api/rest_test.go @@ -26,15 +26,15 @@ import ( "github.com/stretchr/testify/require" bolt "go.etcd.io/bbolt" - "github.com/umputun/remark/backend/app/migrator" - "github.com/umputun/remark/backend/app/notify" - "github.com/umputun/remark/backend/app/rest" - "github.com/umputun/remark/backend/app/rest/proxy" - "github.com/umputun/remark/backend/app/store" - adminstore "github.com/umputun/remark/backend/app/store/admin" - "github.com/umputun/remark/backend/app/store/engine" - "github.com/umputun/remark/backend/app/store/image" - "github.com/umputun/remark/backend/app/store/service" + "github.com/umputun/remark42/backend/app/migrator" + "github.com/umputun/remark42/backend/app/notify" + "github.com/umputun/remark42/backend/app/rest" + "github.com/umputun/remark42/backend/app/rest/proxy" + "github.com/umputun/remark42/backend/app/store" + adminstore "github.com/umputun/remark42/backend/app/store/admin" + "github.com/umputun/remark42/backend/app/store/engine" + "github.com/umputun/remark42/backend/app/store/image" + "github.com/umputun/remark42/backend/app/store/service" ) var devToken = `eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJyZW1hcms0MiIsImV4cCI6Mzc4OTE5MTgyMiwianRpIjoicmFuZG9tIGlkIiwiaXNzIjoicmVtYXJrNDIiLCJuYmYiOjE1MjE4ODQyMjIsInVzZXIiOnsibmFtZSI6ImRldmVsb3BlciBvbmUiLCJpZCI6ImRldiIsInBpY3R1cmUiOiJodHRwOi8vZXhhbXBsZS5jb20vcGljLnBuZyIsImlwIjoiMTI3LjAuMC4xIiwiZW1haWwiOiJtZUBleGFtcGxlLmNvbSJ9fQ.aKUAXiZxXypgV7m1wEOgUcyPOvUDXHDi3A06YWKbcLg` diff --git a/backend/app/rest/api/rss.go b/backend/app/rest/api/rss.go index e435b338..6716e9e8 100644 --- a/backend/app/rest/api/rss.go +++ b/backend/app/rest/api/rss.go @@ -10,8 +10,8 @@ import ( "github.com/gorilla/feeds" "github.com/pkg/errors" - "github.com/umputun/remark/backend/app/rest" - "github.com/umputun/remark/backend/app/store" + "github.com/umputun/remark42/backend/app/rest" + "github.com/umputun/remark42/backend/app/store" ) type rss struct { diff --git a/backend/app/rest/api/rss_test.go b/backend/app/rest/api/rss_test.go index 0dce54f8..92bb58b1 100644 --- a/backend/app/rest/api/rss_test.go +++ b/backend/app/rest/api/rss_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/umputun/remark/backend/app/store" + "github.com/umputun/remark42/backend/app/store" ) func TestServer_RssPost(t *testing.T) { diff --git a/backend/app/rest/httperrors.go b/backend/app/rest/httperrors.go index c174fe0b..59cc7fc8 100644 --- a/backend/app/rest/httperrors.go +++ b/backend/app/rest/httperrors.go @@ -14,7 +14,7 @@ import ( log "github.com/go-pkgz/lgr" "github.com/go-pkgz/rest" - "github.com/umputun/remark/backend/app/templates" + "github.com/umputun/remark42/backend/app/templates" ) // All error codes for UI mapping and translation diff --git a/backend/app/rest/httperrors_test.go b/backend/app/rest/httperrors_test.go index 960a975c..9b17a9c9 100644 --- a/backend/app/rest/httperrors_test.go +++ b/backend/app/rest/httperrors_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/umputun/remark/backend/app/store" + "github.com/umputun/remark42/backend/app/store" ) func TestSendErrorJSON(t *testing.T) { @@ -38,12 +38,12 @@ func TestSendErrorJSON(t *testing.T) { assert.Equal(t, `{"code":123,"details":"error details 123456","error":"error 500"}`+"\n", string(body)) } -type MockFS struct {} +type MockFS struct{} + func (fs *MockFS) ReadFile(path string) ([]byte, error) { return []byte(fmt.Sprintf("{{.Error}}{{.Details}} %s", path)), nil } - func TestSendErrorHTML(t *testing.T) { fs := &MockFS{} ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { diff --git a/backend/app/rest/proxy/image.go b/backend/app/rest/proxy/image.go index 49cb94d2..e33b4ad2 100644 --- a/backend/app/rest/proxy/image.go +++ b/backend/app/rest/proxy/image.go @@ -15,8 +15,8 @@ import ( "github.com/go-pkgz/repeater" "github.com/pkg/errors" - "github.com/umputun/remark/backend/app/rest" - "github.com/umputun/remark/backend/app/store/image" + "github.com/umputun/remark42/backend/app/rest" + "github.com/umputun/remark42/backend/app/store/image" ) // Image extracts image src from comment's html and provides proxy for them diff --git a/backend/app/rest/proxy/image_test.go b/backend/app/rest/proxy/image_test.go index d158cc7b..5b0da882 100644 --- a/backend/app/rest/proxy/image_test.go +++ b/backend/app/rest/proxy/image_test.go @@ -16,7 +16,7 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - "github.com/umputun/remark/backend/app/store/image" + "github.com/umputun/remark42/backend/app/store/image" ) // gopher png for test, from https://golang.org/src/image/png/example_test.go diff --git a/backend/app/rest/user.go b/backend/app/rest/user.go index 5f527884..d4842ba1 100644 --- a/backend/app/rest/user.go +++ b/backend/app/rest/user.go @@ -6,7 +6,7 @@ import ( "github.com/go-pkgz/auth/token" "github.com/pkg/errors" - "github.com/umputun/remark/backend/app/store" + "github.com/umputun/remark42/backend/app/store" ) // MustGetUserInfo fails if can't extract user data from the request. diff --git a/backend/app/rest/user_test.go b/backend/app/rest/user_test.go index 86f54720..a9955cfb 100644 --- a/backend/app/rest/user_test.go +++ b/backend/app/rest/user_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/umputun/remark/backend/app/store" + "github.com/umputun/remark42/backend/app/store" ) func TestUser_GetUserInfo(t *testing.T) { diff --git a/backend/app/store/engine/bolt.go b/backend/app/store/engine/bolt.go index d2ee14e6..d0d747ec 100644 --- a/backend/app/store/engine/bolt.go +++ b/backend/app/store/engine/bolt.go @@ -12,7 +12,7 @@ import ( "github.com/pkg/errors" bolt "go.etcd.io/bbolt" - "github.com/umputun/remark/backend/app/store" + "github.com/umputun/remark42/backend/app/store" ) // BoltDB implements store.Interface, represents multiple sites with multiplexing to different bolt dbs. Thread safe. diff --git a/backend/app/store/engine/bolt_test.go b/backend/app/store/engine/bolt_test.go index 1a82bfa3..66531768 100644 --- a/backend/app/store/engine/bolt_test.go +++ b/backend/app/store/engine/bolt_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/require" bolt "go.etcd.io/bbolt" - "github.com/umputun/remark/backend/app/store" + "github.com/umputun/remark42/backend/app/store" ) var testDb = "/tmp/test-remark.db" diff --git a/backend/app/store/engine/engine.go b/backend/app/store/engine/engine.go index bf0a87d6..0a765428 100644 --- a/backend/app/store/engine/engine.go +++ b/backend/app/store/engine/engine.go @@ -8,7 +8,7 @@ import ( "strings" "time" - "github.com/umputun/remark/backend/app/store" + "github.com/umputun/remark42/backend/app/store" ) // NOTE: mockery works from linked to go-path and with GOFLAGS='-mod=vendor' go generate diff --git a/backend/app/store/engine/engine_mock.go b/backend/app/store/engine/engine_mock.go index 47a66e3b..7068211e 100644 --- a/backend/app/store/engine/engine_mock.go +++ b/backend/app/store/engine/engine_mock.go @@ -2,8 +2,10 @@ package engine -import mock "github.com/stretchr/testify/mock" -import store "github.com/umputun/remark/backend/app/store" +import ( + mock "github.com/stretchr/testify/mock" + store "github.com/umputun/remark42/backend/app/store" +) // MockInterface is an autogenerated mock type for the Interface type type MockInterface struct { diff --git a/backend/app/store/engine/engine_test.go b/backend/app/store/engine/engine_test.go index 6bc718de..0627cedb 100644 --- a/backend/app/store/engine/engine_test.go +++ b/backend/app/store/engine/engine_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/umputun/remark/backend/app/store" + "github.com/umputun/remark42/backend/app/store" ) func TestEngine_sortComments(t *testing.T) { diff --git a/backend/app/store/engine/remote.go b/backend/app/store/engine/remote.go index 5f864737..117d295d 100644 --- a/backend/app/store/engine/remote.go +++ b/backend/app/store/engine/remote.go @@ -5,7 +5,7 @@ import ( "github.com/go-pkgz/jrpc" - "github.com/umputun/remark/backend/app/store" + "github.com/umputun/remark42/backend/app/store" ) // RPC implements remote engine and delegates all Calls to remote http server diff --git a/backend/app/store/engine/remote_test.go b/backend/app/store/engine/remote_test.go index b737481a..cf8215ce 100644 --- a/backend/app/store/engine/remote_test.go +++ b/backend/app/store/engine/remote_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/umputun/remark/backend/app/store" + "github.com/umputun/remark42/backend/app/store" ) func TestRemote_Create(t *testing.T) { diff --git a/backend/app/store/image/image.go b/backend/app/store/image/image.go index 616e0458..11566191 100644 --- a/backend/app/store/image/image.go +++ b/backend/app/store/image/image.go @@ -12,6 +12,7 @@ import ( "encoding/base64" "fmt" "image" + // support gif and jpeg images decoding _ "image/gif" _ "image/jpeg" diff --git a/backend/app/store/image/image_mock.go b/backend/app/store/image/image_mock.go index f9c74ee4..e1a4c977 100644 --- a/backend/app/store/image/image_mock.go +++ b/backend/app/store/image/image_mock.go @@ -2,9 +2,12 @@ package image -import context "context" -import mock "github.com/stretchr/testify/mock" -import time "time" +import ( + context "context" + time "time" + + mock "github.com/stretchr/testify/mock" +) // MockStore is an autogenerated mock type for the Store type type MockStore struct { diff --git a/backend/app/store/service/service.go b/backend/app/store/service/service.go index e88ee2c9..3b2625b9 100644 --- a/backend/app/store/service/service.go +++ b/backend/app/store/service/service.go @@ -15,10 +15,10 @@ import ( "github.com/hashicorp/go-multierror" "github.com/pkg/errors" - "github.com/umputun/remark/backend/app/store" - "github.com/umputun/remark/backend/app/store/admin" - "github.com/umputun/remark/backend/app/store/engine" - "github.com/umputun/remark/backend/app/store/image" + "github.com/umputun/remark42/backend/app/store" + "github.com/umputun/remark42/backend/app/store/admin" + "github.com/umputun/remark42/backend/app/store/engine" + "github.com/umputun/remark42/backend/app/store/image" ) // DataStore wraps store.Interface with additional methods diff --git a/backend/app/store/service/service_test.go b/backend/app/store/service/service_test.go index ec30136f..15adc7e6 100644 --- a/backend/app/store/service/service_test.go +++ b/backend/app/store/service/service_test.go @@ -22,10 +22,10 @@ import ( "github.com/stretchr/testify/require" bolt "go.etcd.io/bbolt" - "github.com/umputun/remark/backend/app/store" - "github.com/umputun/remark/backend/app/store/admin" - "github.com/umputun/remark/backend/app/store/engine" - "github.com/umputun/remark/backend/app/store/image" + "github.com/umputun/remark42/backend/app/store" + "github.com/umputun/remark42/backend/app/store/admin" + "github.com/umputun/remark42/backend/app/store/engine" + "github.com/umputun/remark42/backend/app/store/image" ) func TestService_CreateFromEmpty(t *testing.T) { diff --git a/backend/app/store/service/tree.go b/backend/app/store/service/tree.go index 7f915368..850ef7be 100644 --- a/backend/app/store/service/tree.go +++ b/backend/app/store/service/tree.go @@ -5,7 +5,7 @@ import ( "strings" "time" - "github.com/umputun/remark/backend/app/store" + "github.com/umputun/remark42/backend/app/store" ) // Tree is formatter making tree from the list of comments diff --git a/backend/app/store/service/tree_test.go b/backend/app/store/service/tree_test.go index 8e4c6795..13f05784 100644 --- a/backend/app/store/service/tree_test.go +++ b/backend/app/store/service/tree_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/umputun/remark/backend/app/store" + "github.com/umputun/remark42/backend/app/store" ) func TestMakeTree(t *testing.T) { diff --git a/backend/go.mod b/backend/go.mod index b354ef40..ccd62cd2 100644 --- a/backend/go.mod +++ b/backend/go.mod @@ -1,4 +1,4 @@ -module github.com/umputun/remark/backend +module github.com/umputun/remark42/backend go 1.14