Open platform to collect and prioritize feedback
moved toolbox to pkg
goenning7ce28df788fd
diff --git a/app/identity/setup_test.go b/app/identity/setup_test.goindex e3c7f9c47..8c444167d 100644--- a/app/identity/setup_test.go+++ b/app/identity/setup_test.go@@ -1,7 +1,7 @@package identity_testimport (- "github.com/WeCanHearYou/wechy/app/dbx"+ "github.com/WeCanHearYou/wechy/app/pkg/dbx""github.com/WeCanHearYou/wechy/app/postgres")diff --git a/app/infra/handler.go b/app/infra/handler.goindex d41c6fb6b..dd8dc4d15 100644--- a/app/infra/handler.go+++ b/app/infra/handler.go@@ -6,7 +6,7 @@ import ("time""github.com/WeCanHearYou/wechy/app"- "github.com/WeCanHearYou/wechy/app/toolbox/env"+ "github.com/WeCanHearYou/wechy/app/pkg/env""github.com/labstack/echo")diff --git a/app/infra/jwt.go b/app/infra/jwt.goindex 1e0e2d79c..865ec121d 100644--- a/app/infra/jwt.go+++ b/app/infra/jwt.go@@ -2,7 +2,7 @@ package infraimport ("github.com/WeCanHearYou/wechy/app/models"- "github.com/WeCanHearYou/wechy/app/toolbox/env"+ "github.com/WeCanHearYou/wechy/app/pkg/env"jwt "github.com/dgrijalva/jwt-go")diff --git a/app/dbx/dbx.go b/app/pkg/dbx/dbx.gosimilarity index 97%rename from app/dbx/dbx.gorename to app/pkg/dbx/dbx.goindex 86638699c..4ff441799 100644--- a/app/dbx/dbx.go+++ b/app/pkg/dbx/dbx.go@@ -4,7 +4,7 @@ import ("database/sql""io/ioutil"- "github.com/WeCanHearYou/wechy/app/toolbox/env"+ "github.com/WeCanHearYou/wechy/app/pkg/env"//required_ "github.com/lib/pq"@@ -19,7 +19,7 @@ func New() (*Database, error) {db := &Database{conn}if env.IsTest() {- db.load("/app/dbx/setup.sql")+ db.load("/app/pkg/dbx/setup.sql")}return db, nil}diff --git a/app/dbx/setup.sql b/app/pkg/dbx/setup.sqlsimilarity index 100%rename from app/dbx/setup.sqlrename to app/pkg/dbx/setup.sqldiff --git a/app/toolbox/env/env.go b/app/pkg/env/env.gosimilarity index 100%rename from app/toolbox/env/env.gorename to app/pkg/env/env.godiff --git a/app/toolbox/env/env_test.go b/app/pkg/env/env_test.gosimilarity index 96%rename from app/toolbox/env/env_test.gorename to app/pkg/env/env_test.goindex 61959f04a..ffb5d7c43 100644--- a/app/toolbox/env/env_test.go+++ b/app/pkg/env/env_test.go@@ -4,7 +4,7 @@ import ("os""testing"- "github.com/WeCanHearYou/wechy/app/toolbox/env"+ "github.com/WeCanHearYou/wechy/app/pkg/env". "github.com/onsi/gomega")diff --git a/app/postgres/feedback.go b/app/postgres/feedback.goindex a14bdacd0..c80f36d9f 100644--- a/app/postgres/feedback.go+++ b/app/postgres/feedback.go@@ -4,8 +4,8 @@ import ("time""github.com/WeCanHearYou/wechy/app"- "github.com/WeCanHearYou/wechy/app/dbx""github.com/WeCanHearYou/wechy/app/models"+ "github.com/WeCanHearYou/wechy/app/pkg/dbx")// IdeaService contains read and write operations for ideasdiff --git a/app/postgres/feedback_test.go b/app/postgres/feedback_test.goindex 0120b8be8..c1615ee13 100644--- a/app/postgres/feedback_test.go+++ b/app/postgres/feedback_test.go@@ -5,7 +5,7 @@ import ("time""github.com/WeCanHearYou/wechy/app"- "github.com/WeCanHearYou/wechy/app/dbx"+ "github.com/WeCanHearYou/wechy/app/pkg/dbx""github.com/WeCanHearYou/wechy/app/postgres". "github.com/onsi/gomega")diff --git a/app/postgres/identity.go b/app/postgres/identity.goindex 7a4eed9a4..ab65b4f73 100644--- a/app/postgres/identity.go+++ b/app/postgres/identity.go@@ -5,9 +5,9 @@ import ("time""github.com/WeCanHearYou/wechy/app"- "github.com/WeCanHearYou/wechy/app/dbx"+ "github.com/WeCanHearYou/wechy/app/pkg/dbx""github.com/WeCanHearYou/wechy/app/models"- "github.com/WeCanHearYou/wechy/app/toolbox/env"+ "github.com/WeCanHearYou/wechy/app/pkg/env")// UserService is used for user operations using a Postgres databasediff --git a/app/postgres/identity_test.go b/app/postgres/identity_test.goindex a15d39f70..da6719918 100644--- a/app/postgres/identity_test.go+++ b/app/postgres/identity_test.go@@ -3,7 +3,7 @@ package postgres_testimport ("testing"- "github.com/WeCanHearYou/wechy/app/dbx"+ "github.com/WeCanHearYou/wechy/app/pkg/dbx""github.com/WeCanHearYou/wechy/app/identity""github.com/WeCanHearYou/wechy/app/models""github.com/WeCanHearYou/wechy/app/postgres"diff --git a/app/postgres/infra.go b/app/postgres/infra.goindex a5a44ce05..b3aa53ddb 100644--- a/app/postgres/infra.go+++ b/app/postgres/infra.go@@ -1,6 +1,6 @@package postgres-import "github.com/WeCanHearYou/wechy/app/dbx"+import "github.com/WeCanHearYou/wechy/app/pkg/dbx"// HealthCheckService is a simple general purpose health check servicetype HealthCheckService struct {diff --git a/app/postgres/infra_test.go b/app/postgres/infra_test.goindex 7dbbc953e..1dcbdd6a8 100644--- a/app/postgres/infra_test.go+++ b/app/postgres/infra_test.go@@ -3,7 +3,7 @@ package postgres_testimport ("testing"- "github.com/WeCanHearYou/wechy/app/dbx"+ "github.com/WeCanHearYou/wechy/app/pkg/dbx""github.com/WeCanHearYou/wechy/app/postgres". "github.com/onsi/gomega")diff --git a/app/renderer.go b/app/renderer.goindex 643546b5a..9cd1fa4e3 100644--- a/app/renderer.go+++ b/app/renderer.go@@ -9,7 +9,7 @@ import ("io/ioutil"- "github.com/WeCanHearYou/wechy/app/toolbox/env"+ "github.com/WeCanHearYou/wechy/app/pkg/env""github.com/labstack/echo")diff --git a/main.go b/main.goindex 1d56910ed..ab7c0bfa1 100644--- a/main.go+++ b/main.go@@ -1,11 +1,11 @@package mainimport (- "github.com/WeCanHearYou/wechy/app/dbx"+ "github.com/WeCanHearYou/wechy/app/pkg/dbx""github.com/WeCanHearYou/wechy/app/identity""github.com/WeCanHearYou/wechy/app/infra"+ "github.com/WeCanHearYou/wechy/app/pkg/env""github.com/WeCanHearYou/wechy/app/postgres"- "github.com/WeCanHearYou/wechy/app/toolbox/env"_ "github.com/mattes/migrate/driver/postgres"mig "github.com/mattes/migrate/migrate"diff --git a/router.go b/router.goindex eaf249279..63d25864c 100644--- a/router.go+++ b/router.go@@ -10,7 +10,7 @@ import ("github.com/WeCanHearYou/wechy/app/identity""github.com/WeCanHearYou/wechy/app/infra""github.com/WeCanHearYou/wechy/app/models"- "github.com/WeCanHearYou/wechy/app/toolbox/env"+ "github.com/WeCanHearYou/wechy/app/pkg/env""github.com/labstack/echo""github.com/labstack/echo/middleware""github.com/labstack/gommon/log"