Skip to content

armgit / fider

Public Imported from GitHub
0

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.go
index e3c7f9c47..8c444167d 100644
--- a/app/identity/setup_test.go
+++ b/app/identity/setup_test.go
@@ -1,7 +1,7 @@
package identity_test
import (
- "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.go
index 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.go
index 1e0e2d79c..865ec121d 100644
--- a/app/infra/jwt.go
+++ b/app/infra/jwt.go
@@ -2,7 +2,7 @@ package infra
import (
"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.go
similarity index 97%
rename from app/dbx/dbx.go
rename to app/pkg/dbx/dbx.go
index 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.sql
similarity index 100%
rename from app/dbx/setup.sql
rename to app/pkg/dbx/setup.sql
diff --git a/app/toolbox/env/env.go b/app/pkg/env/env.go
similarity index 100%
rename from app/toolbox/env/env.go
rename to app/pkg/env/env.go
diff --git a/app/toolbox/env/env_test.go b/app/pkg/env/env_test.go
similarity index 96%
rename from app/toolbox/env/env_test.go
rename to app/pkg/env/env_test.go
index 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.go
index 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 ideas
diff --git a/app/postgres/feedback_test.go b/app/postgres/feedback_test.go
index 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.go
index 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 database
diff --git a/app/postgres/identity_test.go b/app/postgres/identity_test.go
index a15d39f70..da6719918 100644
--- a/app/postgres/identity_test.go
+++ b/app/postgres/identity_test.go
@@ -3,7 +3,7 @@ package postgres_test
import (
"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.go
index 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 service
type HealthCheckService struct {
diff --git a/app/postgres/infra_test.go b/app/postgres/infra_test.go
index 7dbbc953e..1dcbdd6a8 100644
--- a/app/postgres/infra_test.go
+++ b/app/postgres/infra_test.go
@@ -3,7 +3,7 @@ package postgres_test
import (
"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.go
index 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.go
index 1d56910ed..ab7c0bfa1 100644
--- a/main.go
+++ b/main.go
@@ -1,11 +1,11 @@
package main
import (
- "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.go
index 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"