From d08f5f55aa6696d47f62fd8873ef5fc3d08e859c Mon Sep 17 00:00:00 2001 From: Tony Grosinger Date: Tue, 9 Jul 2024 17:57:05 -0700 Subject: [PATCH] Rename package --- cmd/web/main.go | 6 +++--- ent/client.go | 8 ++++---- ent/ent.go | 5 +++-- ent/enttest/enttest.go | 10 ++++----- ent/hook/hook.go | 2 +- ent/mutation.go | 7 ++++--- ent/passwordtoken.go | 5 +++-- ent/passwordtoken/where.go | 3 ++- ent/passwordtoken_create.go | 5 +++-- ent/passwordtoken_delete.go | 5 +++-- ent/passwordtoken_query.go | 7 ++++--- ent/passwordtoken_update.go | 7 ++++--- ent/runtime.go | 2 +- ent/runtime/runtime.go | 6 +++--- ent/schema/user.go | 6 +++--- ent/user.go | 3 ++- ent/user/user.go | 3 ++- ent/user/where.go | 3 ++- ent/user_create.go | 5 +++-- ent/user_delete.go | 5 +++-- ent/user_query.go | 7 ++++--- ent/user_update.go | 7 ++++--- go.mod | 2 +- pkg/form/form.go | 3 ++- pkg/form/form_test.go | 5 +++-- pkg/form/submission.go | 4 ++-- pkg/form/submission_test.go | 3 ++- pkg/funcmap/funcmap.go | 9 ++++----- pkg/funcmap/funcmap_test.go | 4 ++-- pkg/handlers/auth.go | 28 +++++++++++--------------- pkg/handlers/cache.go | 13 ++++++------ pkg/handlers/contact.go | 11 +++++----- pkg/handlers/error.go | 11 +++++----- pkg/handlers/handlers.go | 3 ++- pkg/handlers/pages.go | 7 ++++--- pkg/handlers/router.go | 7 ++++--- pkg/handlers/router_test.go | 7 +++---- pkg/handlers/search.go | 7 ++++--- pkg/handlers/task.go | 14 ++++++------- pkg/htmx/htmx_test.go | 5 ++--- pkg/log/log.go | 3 ++- pkg/log/log_test.go | 3 ++- pkg/middleware/auth.go | 12 +++++------ pkg/middleware/auth_test.go | 9 ++++----- pkg/middleware/cache.go | 9 ++++----- pkg/middleware/cache_test.go | 9 ++++----- pkg/middleware/entity.go | 8 ++++---- pkg/middleware/entity_test.go | 8 ++++---- pkg/middleware/log.go | 3 ++- pkg/middleware/log_test.go | 6 +++--- pkg/middleware/middleware_test.go | 8 ++++---- pkg/middleware/session.go | 3 ++- pkg/middleware/session_test.go | 5 +++-- pkg/msg/msg.go | 5 +++-- pkg/msg/msg_test.go | 5 ++--- pkg/page/page.go | 13 ++++++------ pkg/page/page_test.go | 10 ++++----- pkg/page/pager_test.go | 4 ++-- pkg/redirect/redirect.go | 3 ++- pkg/redirect/redirect_test.go | 5 +++-- pkg/services/auth.go | 15 +++++++------- pkg/services/auth_test.go | 7 +++---- pkg/services/container.go | 12 +++++------ pkg/services/mail.go | 7 +++---- pkg/services/services_test.go | 8 ++++---- pkg/services/tasks.go | 5 +++-- pkg/services/template_renderer.go | 13 ++++++------ pkg/services/template_renderer_test.go | 12 +++++------ pkg/session/session.go | 2 +- pkg/tasks/example.go | 4 ++-- pkg/tasks/register.go | 2 +- pkg/tests/tests.go | 6 +++--- 72 files changed, 250 insertions(+), 234 deletions(-) diff --git a/cmd/web/main.go b/cmd/web/main.go index f07d0c7..8ab120f 100644 --- a/cmd/web/main.go +++ b/cmd/web/main.go @@ -11,9 +11,9 @@ import ( "os/signal" "time" - "github.com/mikestefanello/pagoda/pkg/handlers" - "github.com/mikestefanello/pagoda/pkg/services" - "github.com/mikestefanello/pagoda/pkg/tasks" + "git.grosinger.net/tgrosinger/saasitone/pkg/handlers" + "git.grosinger.net/tgrosinger/saasitone/pkg/services" + "git.grosinger.net/tgrosinger/saasitone/pkg/tasks" ) func main() { diff --git a/ent/client.go b/ent/client.go index 7995f57..9560139 100644 --- a/ent/client.go +++ b/ent/client.go @@ -9,14 +9,14 @@ import ( "log" "reflect" - "github.com/mikestefanello/pagoda/ent/migrate" - "entgo.io/ent" "entgo.io/ent/dialect" "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" - "github.com/mikestefanello/pagoda/ent/passwordtoken" - "github.com/mikestefanello/pagoda/ent/user" + + "git.grosinger.net/tgrosinger/saasitone/ent/migrate" + "git.grosinger.net/tgrosinger/saasitone/ent/passwordtoken" + "git.grosinger.net/tgrosinger/saasitone/ent/user" ) // Client is the client that holds all ent builders. diff --git a/ent/ent.go b/ent/ent.go index b6963f2..5d44ec4 100644 --- a/ent/ent.go +++ b/ent/ent.go @@ -12,8 +12,9 @@ import ( "entgo.io/ent" "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" - "github.com/mikestefanello/pagoda/ent/passwordtoken" - "github.com/mikestefanello/pagoda/ent/user" + + "git.grosinger.net/tgrosinger/saasitone/ent/passwordtoken" + "git.grosinger.net/tgrosinger/saasitone/ent/user" ) // ent aliases to avoid import conflicts in user's code. diff --git a/ent/enttest/enttest.go b/ent/enttest/enttest.go index d43e013..9020d70 100644 --- a/ent/enttest/enttest.go +++ b/ent/enttest/enttest.go @@ -5,12 +5,11 @@ package enttest import ( "context" - "github.com/mikestefanello/pagoda/ent" - // required by schema hooks. - _ "github.com/mikestefanello/pagoda/ent/runtime" - "entgo.io/ent/dialect/sql/schema" - "github.com/mikestefanello/pagoda/ent/migrate" + + "git.grosinger.net/tgrosinger/saasitone/ent" + "git.grosinger.net/tgrosinger/saasitone/ent/migrate" + _ "git.grosinger.net/tgrosinger/saasitone/ent/runtime" // required by schema hooks. ) type ( @@ -71,6 +70,7 @@ func NewClient(t TestingT, opts ...Option) *ent.Client { migrateSchema(t, c, o) return c } + func migrateSchema(t TestingT, c *ent.Client, o *options) { tables, err := schema.CopyTables(migrate.Tables) if err != nil { diff --git a/ent/hook/hook.go b/ent/hook/hook.go index cea63fc..8826e4a 100644 --- a/ent/hook/hook.go +++ b/ent/hook/hook.go @@ -6,7 +6,7 @@ import ( "context" "fmt" - "github.com/mikestefanello/pagoda/ent" + "git.grosinger.net/tgrosinger/saasitone/ent" ) // The PasswordTokenFunc type is an adapter to allow the use of ordinary diff --git a/ent/mutation.go b/ent/mutation.go index a1dad5f..fc61aac 100644 --- a/ent/mutation.go +++ b/ent/mutation.go @@ -11,9 +11,10 @@ import ( "entgo.io/ent" "entgo.io/ent/dialect/sql" - "github.com/mikestefanello/pagoda/ent/passwordtoken" - "github.com/mikestefanello/pagoda/ent/predicate" - "github.com/mikestefanello/pagoda/ent/user" + + "git.grosinger.net/tgrosinger/saasitone/ent/passwordtoken" + "git.grosinger.net/tgrosinger/saasitone/ent/predicate" + "git.grosinger.net/tgrosinger/saasitone/ent/user" ) const ( diff --git a/ent/passwordtoken.go b/ent/passwordtoken.go index 65366f4..1bb4935 100644 --- a/ent/passwordtoken.go +++ b/ent/passwordtoken.go @@ -9,8 +9,9 @@ import ( "entgo.io/ent" "entgo.io/ent/dialect/sql" - "github.com/mikestefanello/pagoda/ent/passwordtoken" - "github.com/mikestefanello/pagoda/ent/user" + + "git.grosinger.net/tgrosinger/saasitone/ent/passwordtoken" + "git.grosinger.net/tgrosinger/saasitone/ent/user" ) // PasswordToken is the model entity for the PasswordToken schema. diff --git a/ent/passwordtoken/where.go b/ent/passwordtoken/where.go index cacfbdb..2dcd4d2 100644 --- a/ent/passwordtoken/where.go +++ b/ent/passwordtoken/where.go @@ -7,7 +7,8 @@ import ( "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" - "github.com/mikestefanello/pagoda/ent/predicate" + + "git.grosinger.net/tgrosinger/saasitone/ent/predicate" ) // ID filters vertices based on their ID field. diff --git a/ent/passwordtoken_create.go b/ent/passwordtoken_create.go index d7d8899..9c5de10 100644 --- a/ent/passwordtoken_create.go +++ b/ent/passwordtoken_create.go @@ -10,8 +10,9 @@ import ( "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" - "github.com/mikestefanello/pagoda/ent/passwordtoken" - "github.com/mikestefanello/pagoda/ent/user" + + "git.grosinger.net/tgrosinger/saasitone/ent/passwordtoken" + "git.grosinger.net/tgrosinger/saasitone/ent/user" ) // PasswordTokenCreate is the builder for creating a PasswordToken entity. diff --git a/ent/passwordtoken_delete.go b/ent/passwordtoken_delete.go index c18bbf7..a21ad70 100644 --- a/ent/passwordtoken_delete.go +++ b/ent/passwordtoken_delete.go @@ -8,8 +8,9 @@ import ( "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" - "github.com/mikestefanello/pagoda/ent/passwordtoken" - "github.com/mikestefanello/pagoda/ent/predicate" + + "git.grosinger.net/tgrosinger/saasitone/ent/passwordtoken" + "git.grosinger.net/tgrosinger/saasitone/ent/predicate" ) // PasswordTokenDelete is the builder for deleting a PasswordToken entity. diff --git a/ent/passwordtoken_query.go b/ent/passwordtoken_query.go index 9dbbb91..1c4ce81 100644 --- a/ent/passwordtoken_query.go +++ b/ent/passwordtoken_query.go @@ -10,9 +10,10 @@ import ( "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" - "github.com/mikestefanello/pagoda/ent/passwordtoken" - "github.com/mikestefanello/pagoda/ent/predicate" - "github.com/mikestefanello/pagoda/ent/user" + + "git.grosinger.net/tgrosinger/saasitone/ent/passwordtoken" + "git.grosinger.net/tgrosinger/saasitone/ent/predicate" + "git.grosinger.net/tgrosinger/saasitone/ent/user" ) // PasswordTokenQuery is the builder for querying PasswordToken entities. diff --git a/ent/passwordtoken_update.go b/ent/passwordtoken_update.go index c0c64ce..9133fbb 100644 --- a/ent/passwordtoken_update.go +++ b/ent/passwordtoken_update.go @@ -11,9 +11,10 @@ import ( "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" - "github.com/mikestefanello/pagoda/ent/passwordtoken" - "github.com/mikestefanello/pagoda/ent/predicate" - "github.com/mikestefanello/pagoda/ent/user" + + "git.grosinger.net/tgrosinger/saasitone/ent/passwordtoken" + "git.grosinger.net/tgrosinger/saasitone/ent/predicate" + "git.grosinger.net/tgrosinger/saasitone/ent/user" ) // PasswordTokenUpdate is the builder for updating PasswordToken entities. diff --git a/ent/runtime.go b/ent/runtime.go index 33c9064..d856d39 100644 --- a/ent/runtime.go +++ b/ent/runtime.go @@ -2,4 +2,4 @@ package ent -// The schema-stitching logic is generated in github.com/mikestefanello/pagoda/ent/runtime/runtime.go +// The schema-stitching logic is generated in git.grosinger.net/tgrosinger/saasitone/ent/runtime/runtime.go diff --git a/ent/runtime/runtime.go b/ent/runtime/runtime.go index ab6a63a..dd823d0 100644 --- a/ent/runtime/runtime.go +++ b/ent/runtime/runtime.go @@ -5,9 +5,9 @@ package runtime import ( "time" - "github.com/mikestefanello/pagoda/ent/passwordtoken" - "github.com/mikestefanello/pagoda/ent/schema" - "github.com/mikestefanello/pagoda/ent/user" + "git.grosinger.net/tgrosinger/saasitone/ent/passwordtoken" + "git.grosinger.net/tgrosinger/saasitone/ent/schema" + "git.grosinger.net/tgrosinger/saasitone/ent/user" ) // The init function reads all schema descriptors with runtime code diff --git a/ent/schema/user.go b/ent/schema/user.go index ffd80f5..1c89c7e 100644 --- a/ent/schema/user.go +++ b/ent/schema/user.go @@ -5,12 +5,12 @@ import ( "strings" "time" - ge "github.com/mikestefanello/pagoda/ent" - "github.com/mikestefanello/pagoda/ent/hook" - "entgo.io/ent" "entgo.io/ent/schema/edge" "entgo.io/ent/schema/field" + + ge "git.grosinger.net/tgrosinger/saasitone/ent" + "git.grosinger.net/tgrosinger/saasitone/ent/hook" ) // User holds the schema definition for the User entity. diff --git a/ent/user.go b/ent/user.go index 576a575..09991a1 100644 --- a/ent/user.go +++ b/ent/user.go @@ -9,7 +9,8 @@ import ( "entgo.io/ent" "entgo.io/ent/dialect/sql" - "github.com/mikestefanello/pagoda/ent/user" + + "git.grosinger.net/tgrosinger/saasitone/ent/user" ) // User is the model entity for the User schema. diff --git a/ent/user/user.go b/ent/user/user.go index 06c938c..b3f3559 100644 --- a/ent/user/user.go +++ b/ent/user/user.go @@ -62,7 +62,7 @@ func ValidColumn(column string) bool { // package on the initialization of the application. Therefore, // it should be imported in the main as follows: // -// import _ "github.com/mikestefanello/pagoda/ent/runtime" +// import _ "git.grosinger.net/tgrosinger/saasitone/ent/runtime" var ( Hooks [1]ent.Hook // NameValidator is a validator for the "name" field. It is called by the builders before save. @@ -123,6 +123,7 @@ func ByOwner(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { sqlgraph.OrderByNeighborTerms(s, newOwnerStep(), append([]sql.OrderTerm{term}, terms...)...) } } + func newOwnerStep() *sqlgraph.Step { return sqlgraph.NewStep( sqlgraph.From(Table, FieldID), diff --git a/ent/user/where.go b/ent/user/where.go index 5ec1168..d13d6cf 100644 --- a/ent/user/where.go +++ b/ent/user/where.go @@ -7,7 +7,8 @@ import ( "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" - "github.com/mikestefanello/pagoda/ent/predicate" + + "git.grosinger.net/tgrosinger/saasitone/ent/predicate" ) // ID filters vertices based on their ID field. diff --git a/ent/user_create.go b/ent/user_create.go index 6f98b46..a42719a 100644 --- a/ent/user_create.go +++ b/ent/user_create.go @@ -10,8 +10,9 @@ import ( "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" - "github.com/mikestefanello/pagoda/ent/passwordtoken" - "github.com/mikestefanello/pagoda/ent/user" + + "git.grosinger.net/tgrosinger/saasitone/ent/passwordtoken" + "git.grosinger.net/tgrosinger/saasitone/ent/user" ) // UserCreate is the builder for creating a User entity. diff --git a/ent/user_delete.go b/ent/user_delete.go index ed884c8..20f59ac 100644 --- a/ent/user_delete.go +++ b/ent/user_delete.go @@ -8,8 +8,9 @@ import ( "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" - "github.com/mikestefanello/pagoda/ent/predicate" - "github.com/mikestefanello/pagoda/ent/user" + + "git.grosinger.net/tgrosinger/saasitone/ent/predicate" + "git.grosinger.net/tgrosinger/saasitone/ent/user" ) // UserDelete is the builder for deleting a User entity. diff --git a/ent/user_query.go b/ent/user_query.go index 77a1d02..bebe185 100644 --- a/ent/user_query.go +++ b/ent/user_query.go @@ -11,9 +11,10 @@ import ( "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" - "github.com/mikestefanello/pagoda/ent/passwordtoken" - "github.com/mikestefanello/pagoda/ent/predicate" - "github.com/mikestefanello/pagoda/ent/user" + + "git.grosinger.net/tgrosinger/saasitone/ent/passwordtoken" + "git.grosinger.net/tgrosinger/saasitone/ent/predicate" + "git.grosinger.net/tgrosinger/saasitone/ent/user" ) // UserQuery is the builder for querying User entities. diff --git a/ent/user_update.go b/ent/user_update.go index 827ac93..d1b144f 100644 --- a/ent/user_update.go +++ b/ent/user_update.go @@ -10,9 +10,10 @@ import ( "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" - "github.com/mikestefanello/pagoda/ent/passwordtoken" - "github.com/mikestefanello/pagoda/ent/predicate" - "github.com/mikestefanello/pagoda/ent/user" + + "git.grosinger.net/tgrosinger/saasitone/ent/passwordtoken" + "git.grosinger.net/tgrosinger/saasitone/ent/predicate" + "git.grosinger.net/tgrosinger/saasitone/ent/user" ) // UserUpdate is the builder for updating User entities. diff --git a/go.mod b/go.mod index 2614f5a..f1c8c23 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/mikestefanello/pagoda +module git.grosinger.net/tgrosinger/saasitone go 1.22 diff --git a/pkg/form/form.go b/pkg/form/form.go index 6832d15..baa275c 100644 --- a/pkg/form/form.go +++ b/pkg/form/form.go @@ -2,7 +2,8 @@ package form import ( "github.com/labstack/echo/v4" - "github.com/mikestefanello/pagoda/pkg/context" + + "git.grosinger.net/tgrosinger/saasitone/pkg/context" ) // Form represents a form that can be submitted and validated diff --git a/pkg/form/form_test.go b/pkg/form/form_test.go index c297150..fe16fba 100644 --- a/pkg/form/form_test.go +++ b/pkg/form/form_test.go @@ -4,10 +4,11 @@ import ( "testing" "github.com/labstack/echo/v4" - "github.com/mikestefanello/pagoda/pkg/context" - "github.com/mikestefanello/pagoda/pkg/tests" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "git.grosinger.net/tgrosinger/saasitone/pkg/context" + "git.grosinger.net/tgrosinger/saasitone/pkg/tests" ) type mockForm struct { diff --git a/pkg/form/submission.go b/pkg/form/submission.go index 88d898f..e1c236a 100644 --- a/pkg/form/submission.go +++ b/pkg/form/submission.go @@ -5,9 +5,9 @@ import ( "net/http" "github.com/go-playground/validator/v10" - "github.com/mikestefanello/pagoda/pkg/context" - "github.com/labstack/echo/v4" + + "git.grosinger.net/tgrosinger/saasitone/pkg/context" ) // Submission represents the state of the submission of a form, not including the form itself. diff --git a/pkg/form/submission_test.go b/pkg/form/submission_test.go index 3b3a9dc..a4e44c5 100644 --- a/pkg/form/submission_test.go +++ b/pkg/form/submission_test.go @@ -8,9 +8,10 @@ import ( "github.com/go-playground/validator/v10" "github.com/labstack/echo/v4" - "github.com/mikestefanello/pagoda/pkg/services" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "git.grosinger.net/tgrosinger/saasitone/pkg/services" ) func TestFormSubmission(t *testing.T) { diff --git a/pkg/funcmap/funcmap.go b/pkg/funcmap/funcmap.go index af7c079..b359183 100644 --- a/pkg/funcmap/funcmap.go +++ b/pkg/funcmap/funcmap.go @@ -9,13 +9,12 @@ import ( "github.com/Masterminds/sprig" "github.com/labstack/echo/v4" "github.com/labstack/gommon/random" - "github.com/mikestefanello/pagoda/config" + + "git.grosinger.net/tgrosinger/saasitone/config" ) -var ( - // CacheBuster stores a random string used as a cache buster for static files. - CacheBuster = random.String(10) -) +// CacheBuster stores a random string used as a cache buster for static files. +var CacheBuster = random.String(10) type funcMap struct { web *echo.Echo diff --git a/pkg/funcmap/funcmap_test.go b/pkg/funcmap/funcmap_test.go index 5ddf3bc..55273db 100644 --- a/pkg/funcmap/funcmap_test.go +++ b/pkg/funcmap/funcmap_test.go @@ -5,9 +5,9 @@ import ( "testing" "github.com/labstack/echo/v4" - "github.com/mikestefanello/pagoda/config" - "github.com/stretchr/testify/assert" + + "git.grosinger.net/tgrosinger/saasitone/config" ) func TestNewFuncMap(t *testing.T) { diff --git a/pkg/handlers/auth.go b/pkg/handlers/auth.go index b7f9edd..bd928b2 100644 --- a/pkg/handlers/auth.go +++ b/pkg/handlers/auth.go @@ -6,17 +6,18 @@ import ( "github.com/go-playground/validator/v10" "github.com/labstack/echo/v4" - "github.com/mikestefanello/pagoda/ent" - "github.com/mikestefanello/pagoda/ent/user" - "github.com/mikestefanello/pagoda/pkg/context" - "github.com/mikestefanello/pagoda/pkg/form" - "github.com/mikestefanello/pagoda/pkg/log" - "github.com/mikestefanello/pagoda/pkg/middleware" - "github.com/mikestefanello/pagoda/pkg/msg" - "github.com/mikestefanello/pagoda/pkg/page" - "github.com/mikestefanello/pagoda/pkg/redirect" - "github.com/mikestefanello/pagoda/pkg/services" - "github.com/mikestefanello/pagoda/templates" + + "git.grosinger.net/tgrosinger/saasitone/ent" + "git.grosinger.net/tgrosinger/saasitone/ent/user" + "git.grosinger.net/tgrosinger/saasitone/pkg/context" + "git.grosinger.net/tgrosinger/saasitone/pkg/form" + "git.grosinger.net/tgrosinger/saasitone/pkg/log" + "git.grosinger.net/tgrosinger/saasitone/pkg/middleware" + "git.grosinger.net/tgrosinger/saasitone/pkg/msg" + "git.grosinger.net/tgrosinger/saasitone/pkg/page" + "git.grosinger.net/tgrosinger/saasitone/pkg/redirect" + "git.grosinger.net/tgrosinger/saasitone/pkg/services" + "git.grosinger.net/tgrosinger/saasitone/templates" ) const ( @@ -159,7 +160,6 @@ func (h *Auth) ForgotPasswordSubmit(ctx echo.Context) error { Subject("Reset your password"). Body(fmt.Sprintf("Go here to reset your password: %s", url)). Send(ctx) - if err != nil { return fail(err, "error sending password reset email") } @@ -335,7 +335,6 @@ func (h *Auth) sendVerificationEmail(ctx echo.Context, usr *ent.User) { Subject("Confirm your email address"). Body(fmt.Sprintf("Click here to confirm your email address: %s", url)). Send(ctx) - if err != nil { log.Ctx(ctx).Error("unable to send email verification link", "user_id", usr.ID, @@ -384,7 +383,6 @@ func (h *Auth) ResetPasswordSubmit(ctx echo.Context) error { Update(). SetPassword(hash). Save(ctx.Request().Context()) - if err != nil { return fail(err, "unable to update password") } @@ -429,7 +427,6 @@ func (h *Auth) VerifyEmail(ctx echo.Context) error { Query(). Where(user.Email(email)). Only(ctx.Request().Context()) - if err != nil { return fail(err, "query failed loading email verification token user") } @@ -441,7 +438,6 @@ func (h *Auth) VerifyEmail(ctx echo.Context) error { Update(). SetVerified(true). Save(ctx.Request().Context()) - if err != nil { return fail(err, "failed to set user as verified") } diff --git a/pkg/handlers/cache.go b/pkg/handlers/cache.go index a0600f4..e3dac22 100644 --- a/pkg/handlers/cache.go +++ b/pkg/handlers/cache.go @@ -2,12 +2,14 @@ package handlers import ( "errors" - "github.com/labstack/echo/v4" - "github.com/mikestefanello/pagoda/pkg/form" - "github.com/mikestefanello/pagoda/pkg/page" - "github.com/mikestefanello/pagoda/pkg/services" - "github.com/mikestefanello/pagoda/templates" "time" + + "github.com/labstack/echo/v4" + + "git.grosinger.net/tgrosinger/saasitone/pkg/form" + "git.grosinger.net/tgrosinger/saasitone/pkg/page" + "git.grosinger.net/tgrosinger/saasitone/pkg/services" + "git.grosinger.net/tgrosinger/saasitone/templates" ) const ( @@ -81,7 +83,6 @@ func (h *Cache) Submit(ctx echo.Context) error { Data(input.Value). Expiration(30 * time.Minute). Save(ctx.Request().Context()) - if err != nil { return fail(err, "unable to set cache") } diff --git a/pkg/handlers/contact.go b/pkg/handlers/contact.go index 4c5f264..a7d79af 100644 --- a/pkg/handlers/contact.go +++ b/pkg/handlers/contact.go @@ -2,12 +2,14 @@ package handlers import ( "fmt" + "github.com/go-playground/validator/v10" "github.com/labstack/echo/v4" - "github.com/mikestefanello/pagoda/pkg/form" - "github.com/mikestefanello/pagoda/pkg/page" - "github.com/mikestefanello/pagoda/pkg/services" - "github.com/mikestefanello/pagoda/templates" + + "git.grosinger.net/tgrosinger/saasitone/pkg/form" + "git.grosinger.net/tgrosinger/saasitone/pkg/page" + "git.grosinger.net/tgrosinger/saasitone/pkg/services" + "git.grosinger.net/tgrosinger/saasitone/templates" ) const ( @@ -73,7 +75,6 @@ func (h *Contact) Submit(ctx echo.Context) error { Subject("Contact form submitted"). Body(fmt.Sprintf("The message is: %s", input.Message)). Send(ctx) - if err != nil { return fail(err, "unable to send email") } diff --git a/pkg/handlers/error.go b/pkg/handlers/error.go index fd5502b..d34ca73 100644 --- a/pkg/handlers/error.go +++ b/pkg/handlers/error.go @@ -4,11 +4,12 @@ import ( "net/http" "github.com/labstack/echo/v4" - "github.com/mikestefanello/pagoda/pkg/context" - "github.com/mikestefanello/pagoda/pkg/log" - "github.com/mikestefanello/pagoda/pkg/page" - "github.com/mikestefanello/pagoda/pkg/services" - "github.com/mikestefanello/pagoda/templates" + + "git.grosinger.net/tgrosinger/saasitone/pkg/context" + "git.grosinger.net/tgrosinger/saasitone/pkg/log" + "git.grosinger.net/tgrosinger/saasitone/pkg/page" + "git.grosinger.net/tgrosinger/saasitone/pkg/services" + "git.grosinger.net/tgrosinger/saasitone/templates" ) type Error struct { diff --git a/pkg/handlers/handlers.go b/pkg/handlers/handlers.go index d5c1c0d..deac0d4 100644 --- a/pkg/handlers/handlers.go +++ b/pkg/handlers/handlers.go @@ -5,7 +5,8 @@ import ( "net/http" "github.com/labstack/echo/v4" - "github.com/mikestefanello/pagoda/pkg/services" + + "git.grosinger.net/tgrosinger/saasitone/pkg/services" ) var handlers []Handler diff --git a/pkg/handlers/pages.go b/pkg/handlers/pages.go index 481ec4a..37701e5 100644 --- a/pkg/handlers/pages.go +++ b/pkg/handlers/pages.go @@ -5,9 +5,10 @@ import ( "html/template" "github.com/labstack/echo/v4" - "github.com/mikestefanello/pagoda/pkg/page" - "github.com/mikestefanello/pagoda/pkg/services" - "github.com/mikestefanello/pagoda/templates" + + "git.grosinger.net/tgrosinger/saasitone/pkg/page" + "git.grosinger.net/tgrosinger/saasitone/pkg/services" + "git.grosinger.net/tgrosinger/saasitone/templates" ) const ( diff --git a/pkg/handlers/router.go b/pkg/handlers/router.go index d1bc9fc..996cdc2 100644 --- a/pkg/handlers/router.go +++ b/pkg/handlers/router.go @@ -5,9 +5,10 @@ import ( "github.com/gorilla/sessions" echomw "github.com/labstack/echo/v4/middleware" - "github.com/mikestefanello/pagoda/config" - "github.com/mikestefanello/pagoda/pkg/middleware" - "github.com/mikestefanello/pagoda/pkg/services" + + "git.grosinger.net/tgrosinger/saasitone/config" + "git.grosinger.net/tgrosinger/saasitone/pkg/middleware" + "git.grosinger.net/tgrosinger/saasitone/pkg/services" ) // BuildRouter builds the router diff --git a/pkg/handlers/router_test.go b/pkg/handlers/router_test.go index 002d077..3b8e069 100644 --- a/pkg/handlers/router_test.go +++ b/pkg/handlers/router_test.go @@ -8,13 +8,12 @@ import ( "os" "testing" - "github.com/mikestefanello/pagoda/config" - "github.com/mikestefanello/pagoda/pkg/services" - "github.com/PuerkitoBio/goquery" "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" + + "git.grosinger.net/tgrosinger/saasitone/config" + "git.grosinger.net/tgrosinger/saasitone/pkg/services" ) var ( diff --git a/pkg/handlers/search.go b/pkg/handlers/search.go index 06ebd30..1406faf 100644 --- a/pkg/handlers/search.go +++ b/pkg/handlers/search.go @@ -5,9 +5,10 @@ import ( "math/rand" "github.com/labstack/echo/v4" - "github.com/mikestefanello/pagoda/pkg/page" - "github.com/mikestefanello/pagoda/pkg/services" - "github.com/mikestefanello/pagoda/templates" + + "git.grosinger.net/tgrosinger/saasitone/pkg/page" + "git.grosinger.net/tgrosinger/saasitone/pkg/services" + "git.grosinger.net/tgrosinger/saasitone/templates" ) const routeNameSearch = "search" diff --git a/pkg/handlers/task.go b/pkg/handlers/task.go index f4abc64..83ae470 100644 --- a/pkg/handlers/task.go +++ b/pkg/handlers/task.go @@ -2,16 +2,17 @@ package handlers import ( "fmt" - "github.com/mikestefanello/pagoda/pkg/msg" "time" "github.com/go-playground/validator/v10" "github.com/labstack/echo/v4" - "github.com/mikestefanello/pagoda/pkg/form" - "github.com/mikestefanello/pagoda/pkg/page" - "github.com/mikestefanello/pagoda/pkg/services" - "github.com/mikestefanello/pagoda/pkg/tasks" - "github.com/mikestefanello/pagoda/templates" + + "git.grosinger.net/tgrosinger/saasitone/pkg/form" + "git.grosinger.net/tgrosinger/saasitone/pkg/msg" + "git.grosinger.net/tgrosinger/saasitone/pkg/page" + "git.grosinger.net/tgrosinger/saasitone/pkg/services" + "git.grosinger.net/tgrosinger/saasitone/pkg/tasks" + "git.grosinger.net/tgrosinger/saasitone/templates" ) const ( @@ -76,7 +77,6 @@ func (h *Task) Submit(ctx echo.Context) error { }). Wait(time.Duration(input.Delay) * time.Second). Save() - if err != nil { return fail(err, "unable to create a task") } diff --git a/pkg/htmx/htmx_test.go b/pkg/htmx/htmx_test.go index 93fa06e..f9fd5dd 100644 --- a/pkg/htmx/htmx_test.go +++ b/pkg/htmx/htmx_test.go @@ -4,11 +4,10 @@ import ( "net/http" "testing" - "github.com/mikestefanello/pagoda/pkg/tests" - + "github.com/labstack/echo/v4" "github.com/stretchr/testify/assert" - "github.com/labstack/echo/v4" + "git.grosinger.net/tgrosinger/saasitone/pkg/tests" ) func TestSetRequest(t *testing.T) { diff --git a/pkg/log/log.go b/pkg/log/log.go index ebafd28..f26ed0f 100644 --- a/pkg/log/log.go +++ b/pkg/log/log.go @@ -4,7 +4,8 @@ import ( "log/slog" "github.com/labstack/echo/v4" - "github.com/mikestefanello/pagoda/pkg/context" + + "git.grosinger.net/tgrosinger/saasitone/pkg/context" ) // Set sets a logger in the context diff --git a/pkg/log/log_test.go b/pkg/log/log_test.go index d9486a8..d16b3e7 100644 --- a/pkg/log/log_test.go +++ b/pkg/log/log_test.go @@ -4,8 +4,9 @@ import ( "testing" "github.com/labstack/echo/v4" - "github.com/mikestefanello/pagoda/pkg/tests" "github.com/stretchr/testify/assert" + + "git.grosinger.net/tgrosinger/saasitone/pkg/tests" ) func TestCtxSet(t *testing.T) { diff --git a/pkg/middleware/auth.go b/pkg/middleware/auth.go index 6194b60..91e50d2 100644 --- a/pkg/middleware/auth.go +++ b/pkg/middleware/auth.go @@ -5,13 +5,13 @@ import ( "net/http" "strconv" - "github.com/mikestefanello/pagoda/ent" - "github.com/mikestefanello/pagoda/pkg/context" - "github.com/mikestefanello/pagoda/pkg/log" - "github.com/mikestefanello/pagoda/pkg/msg" - "github.com/mikestefanello/pagoda/pkg/services" - "github.com/labstack/echo/v4" + + "git.grosinger.net/tgrosinger/saasitone/ent" + "git.grosinger.net/tgrosinger/saasitone/pkg/context" + "git.grosinger.net/tgrosinger/saasitone/pkg/log" + "git.grosinger.net/tgrosinger/saasitone/pkg/msg" + "git.grosinger.net/tgrosinger/saasitone/pkg/services" ) // LoadAuthenticatedUser loads the authenticated user, if one, and stores in context diff --git a/pkg/middleware/auth_test.go b/pkg/middleware/auth_test.go index eebd910..7999a2b 100644 --- a/pkg/middleware/auth_test.go +++ b/pkg/middleware/auth_test.go @@ -5,13 +5,12 @@ import ( "net/http" "testing" - "github.com/mikestefanello/pagoda/ent" - "github.com/mikestefanello/pagoda/pkg/context" - "github.com/mikestefanello/pagoda/pkg/tests" - + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/stretchr/testify/assert" + "git.grosinger.net/tgrosinger/saasitone/ent" + "git.grosinger.net/tgrosinger/saasitone/pkg/context" + "git.grosinger.net/tgrosinger/saasitone/pkg/tests" ) func TestLoadAuthenticatedUser(t *testing.T) { diff --git a/pkg/middleware/cache.go b/pkg/middleware/cache.go index 1701dc2..cf28169 100644 --- a/pkg/middleware/cache.go +++ b/pkg/middleware/cache.go @@ -6,11 +6,11 @@ import ( "net/http" "time" - "github.com/mikestefanello/pagoda/pkg/context" - "github.com/mikestefanello/pagoda/pkg/log" - "github.com/mikestefanello/pagoda/pkg/services" - "github.com/labstack/echo/v4" + + "git.grosinger.net/tgrosinger/saasitone/pkg/context" + "git.grosinger.net/tgrosinger/saasitone/pkg/log" + "git.grosinger.net/tgrosinger/saasitone/pkg/services" ) // ServeCachedPage attempts to load a page from the cache by matching on the complete request URL @@ -31,7 +31,6 @@ func ServeCachedPage(t *services.TemplateRenderer) echo.MiddlewareFunc { // Attempt to load from cache page, err := t.GetCachedPage(ctx, ctx.Request().URL.String()) - if err != nil { switch { case errors.Is(err, services.ErrCacheMiss): diff --git a/pkg/middleware/cache_test.go b/pkg/middleware/cache_test.go index fcd7fb4..7cc7ee3 100644 --- a/pkg/middleware/cache_test.go +++ b/pkg/middleware/cache_test.go @@ -5,13 +5,12 @@ import ( "testing" "time" - "github.com/mikestefanello/pagoda/pkg/page" - "github.com/mikestefanello/pagoda/pkg/tests" - "github.com/mikestefanello/pagoda/templates" - + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/stretchr/testify/assert" + "git.grosinger.net/tgrosinger/saasitone/pkg/page" + "git.grosinger.net/tgrosinger/saasitone/pkg/tests" + "git.grosinger.net/tgrosinger/saasitone/templates" ) func TestServeCachedPage(t *testing.T) { diff --git a/pkg/middleware/entity.go b/pkg/middleware/entity.go index c13bee7..b89fb2b 100644 --- a/pkg/middleware/entity.go +++ b/pkg/middleware/entity.go @@ -5,11 +5,11 @@ import ( "net/http" "strconv" - "github.com/mikestefanello/pagoda/ent" - "github.com/mikestefanello/pagoda/ent/user" - "github.com/mikestefanello/pagoda/pkg/context" - "github.com/labstack/echo/v4" + + "git.grosinger.net/tgrosinger/saasitone/ent" + "git.grosinger.net/tgrosinger/saasitone/ent/user" + "git.grosinger.net/tgrosinger/saasitone/pkg/context" ) // LoadUser loads the user based on the ID provided as a path parameter diff --git a/pkg/middleware/entity_test.go b/pkg/middleware/entity_test.go index 42f4f33..7cf0b9b 100644 --- a/pkg/middleware/entity_test.go +++ b/pkg/middleware/entity_test.go @@ -4,12 +4,12 @@ import ( "fmt" "testing" - "github.com/mikestefanello/pagoda/ent" - "github.com/mikestefanello/pagoda/pkg/context" - "github.com/mikestefanello/pagoda/pkg/tests" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "git.grosinger.net/tgrosinger/saasitone/ent" + "git.grosinger.net/tgrosinger/saasitone/pkg/context" + "git.grosinger.net/tgrosinger/saasitone/pkg/tests" ) func TestLoadUser(t *testing.T) { diff --git a/pkg/middleware/log.go b/pkg/middleware/log.go index d9eede0..37ff515 100644 --- a/pkg/middleware/log.go +++ b/pkg/middleware/log.go @@ -6,7 +6,8 @@ import ( "time" "github.com/labstack/echo/v4" - "github.com/mikestefanello/pagoda/pkg/log" + + "git.grosinger.net/tgrosinger/saasitone/pkg/log" ) // SetLogger initializes a logger for the current request and stores it in the context. diff --git a/pkg/middleware/log_test.go b/pkg/middleware/log_test.go index 129376a..68ad271 100644 --- a/pkg/middleware/log_test.go +++ b/pkg/middleware/log_test.go @@ -7,11 +7,11 @@ import ( "github.com/labstack/echo/v4" echomw "github.com/labstack/echo/v4/middleware" - "github.com/mikestefanello/pagoda/pkg/log" - "github.com/mikestefanello/pagoda/pkg/tests" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/stretchr/testify/assert" + "git.grosinger.net/tgrosinger/saasitone/pkg/log" + "git.grosinger.net/tgrosinger/saasitone/pkg/tests" ) type mockLogHandler struct { diff --git a/pkg/middleware/middleware_test.go b/pkg/middleware/middleware_test.go index 6c5d5c3..213b4df 100644 --- a/pkg/middleware/middleware_test.go +++ b/pkg/middleware/middleware_test.go @@ -4,10 +4,10 @@ import ( "os" "testing" - "github.com/mikestefanello/pagoda/config" - "github.com/mikestefanello/pagoda/ent" - "github.com/mikestefanello/pagoda/pkg/services" - "github.com/mikestefanello/pagoda/pkg/tests" + "git.grosinger.net/tgrosinger/saasitone/config" + "git.grosinger.net/tgrosinger/saasitone/ent" + "git.grosinger.net/tgrosinger/saasitone/pkg/services" + "git.grosinger.net/tgrosinger/saasitone/pkg/tests" ) var ( diff --git a/pkg/middleware/session.go b/pkg/middleware/session.go index 2e6a43c..772a3c1 100644 --- a/pkg/middleware/session.go +++ b/pkg/middleware/session.go @@ -4,7 +4,8 @@ import ( "github.com/gorilla/context" "github.com/gorilla/sessions" "github.com/labstack/echo/v4" - "github.com/mikestefanello/pagoda/pkg/session" + + "git.grosinger.net/tgrosinger/saasitone/pkg/session" ) // Session sets the session storage in the request context diff --git a/pkg/middleware/session_test.go b/pkg/middleware/session_test.go index b48181c..5491b78 100644 --- a/pkg/middleware/session_test.go +++ b/pkg/middleware/session_test.go @@ -4,10 +4,11 @@ import ( "testing" "github.com/gorilla/sessions" - "github.com/mikestefanello/pagoda/pkg/session" - "github.com/mikestefanello/pagoda/pkg/tests" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "git.grosinger.net/tgrosinger/saasitone/pkg/session" + "git.grosinger.net/tgrosinger/saasitone/pkg/tests" ) func TestSession(t *testing.T) { diff --git a/pkg/msg/msg.go b/pkg/msg/msg.go index e8274f5..911dc48 100644 --- a/pkg/msg/msg.go +++ b/pkg/msg/msg.go @@ -3,8 +3,9 @@ package msg import ( "github.com/gorilla/sessions" "github.com/labstack/echo/v4" - "github.com/mikestefanello/pagoda/pkg/log" - "github.com/mikestefanello/pagoda/pkg/session" + + "git.grosinger.net/tgrosinger/saasitone/pkg/log" + "git.grosinger.net/tgrosinger/saasitone/pkg/session" ) // Type is a message type diff --git a/pkg/msg/msg_test.go b/pkg/msg/msg_test.go index 38da0ce..545f529 100644 --- a/pkg/msg/msg_test.go +++ b/pkg/msg/msg_test.go @@ -3,12 +3,11 @@ package msg import ( "testing" - "github.com/mikestefanello/pagoda/pkg/tests" - + "github.com/labstack/echo/v4" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/labstack/echo/v4" + "git.grosinger.net/tgrosinger/saasitone/pkg/tests" ) func TestMsg(t *testing.T) { diff --git a/pkg/page/page.go b/pkg/page/page.go index e5bbd8e..3f2b7e7 100644 --- a/pkg/page/page.go +++ b/pkg/page/page.go @@ -5,15 +5,14 @@ import ( "net/http" "time" - "github.com/mikestefanello/pagoda/ent" - "github.com/mikestefanello/pagoda/pkg/context" - "github.com/mikestefanello/pagoda/pkg/htmx" - "github.com/mikestefanello/pagoda/pkg/msg" - "github.com/mikestefanello/pagoda/templates" - + "github.com/labstack/echo/v4" echomw "github.com/labstack/echo/v4/middleware" - "github.com/labstack/echo/v4" + "git.grosinger.net/tgrosinger/saasitone/ent" + "git.grosinger.net/tgrosinger/saasitone/pkg/context" + "git.grosinger.net/tgrosinger/saasitone/pkg/htmx" + "git.grosinger.net/tgrosinger/saasitone/pkg/msg" + "git.grosinger.net/tgrosinger/saasitone/templates" ) // Page consists of all data that will be used to render a page response for a given route. diff --git a/pkg/page/page_test.go b/pkg/page/page_test.go index 1ab10cb..e7bf6c3 100644 --- a/pkg/page/page_test.go +++ b/pkg/page/page_test.go @@ -5,13 +5,13 @@ import ( "testing" "github.com/labstack/echo/v4" - "github.com/mikestefanello/pagoda/ent" - "github.com/mikestefanello/pagoda/pkg/context" - "github.com/mikestefanello/pagoda/pkg/msg" - "github.com/mikestefanello/pagoda/pkg/tests" - echomw "github.com/labstack/echo/v4/middleware" "github.com/stretchr/testify/assert" + + "git.grosinger.net/tgrosinger/saasitone/ent" + "git.grosinger.net/tgrosinger/saasitone/pkg/context" + "git.grosinger.net/tgrosinger/saasitone/pkg/msg" + "git.grosinger.net/tgrosinger/saasitone/pkg/tests" ) func TestNew(t *testing.T) { diff --git a/pkg/page/pager_test.go b/pkg/page/pager_test.go index b8aaaea..1ca893c 100644 --- a/pkg/page/pager_test.go +++ b/pkg/page/pager_test.go @@ -5,9 +5,9 @@ import ( "testing" "github.com/labstack/echo/v4" - "github.com/mikestefanello/pagoda/pkg/tests" - "github.com/stretchr/testify/assert" + + "git.grosinger.net/tgrosinger/saasitone/pkg/tests" ) func TestNewPager(t *testing.T) { diff --git a/pkg/redirect/redirect.go b/pkg/redirect/redirect.go index 3e97179..2b1d20e 100644 --- a/pkg/redirect/redirect.go +++ b/pkg/redirect/redirect.go @@ -7,7 +7,8 @@ import ( "net/url" "github.com/labstack/echo/v4" - "github.com/mikestefanello/pagoda/pkg/htmx" + + "git.grosinger.net/tgrosinger/saasitone/pkg/htmx" ) // Redirect is a helper to perform HTTP redirects. diff --git a/pkg/redirect/redirect_test.go b/pkg/redirect/redirect_test.go index 4685f2a..3cbec11 100644 --- a/pkg/redirect/redirect_test.go +++ b/pkg/redirect/redirect_test.go @@ -6,10 +6,11 @@ import ( "testing" "github.com/labstack/echo/v4" - "github.com/mikestefanello/pagoda/pkg/htmx" - "github.com/mikestefanello/pagoda/pkg/tests" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "git.grosinger.net/tgrosinger/saasitone/pkg/htmx" + "git.grosinger.net/tgrosinger/saasitone/pkg/tests" ) func TestRedirect(t *testing.T) { diff --git a/pkg/services/auth.go b/pkg/services/auth.go index b25ebf9..7d5dc09 100644 --- a/pkg/services/auth.go +++ b/pkg/services/auth.go @@ -8,15 +8,15 @@ import ( "time" "github.com/golang-jwt/jwt" - "github.com/mikestefanello/pagoda/config" - "github.com/mikestefanello/pagoda/ent" - "github.com/mikestefanello/pagoda/ent/passwordtoken" - "github.com/mikestefanello/pagoda/ent/user" - "github.com/mikestefanello/pagoda/pkg/context" - "github.com/mikestefanello/pagoda/pkg/session" - "github.com/labstack/echo/v4" "golang.org/x/crypto/bcrypt" + + "git.grosinger.net/tgrosinger/saasitone/config" + "git.grosinger.net/tgrosinger/saasitone/ent" + "git.grosinger.net/tgrosinger/saasitone/ent/passwordtoken" + "git.grosinger.net/tgrosinger/saasitone/ent/user" + "git.grosinger.net/tgrosinger/saasitone/pkg/context" + "git.grosinger.net/tgrosinger/saasitone/pkg/session" ) const ( @@ -220,7 +220,6 @@ func (c *AuthClient) ValidateEmailVerificationToken(token string) (string, error return []byte(c.config.App.EncryptionKey), nil }) - if err != nil { return "", err } diff --git a/pkg/services/auth_test.go b/pkg/services/auth_test.go index 4028073..b91c518 100644 --- a/pkg/services/auth_test.go +++ b/pkg/services/auth_test.go @@ -6,12 +6,11 @@ import ( "testing" "time" - "github.com/mikestefanello/pagoda/ent/passwordtoken" - "github.com/mikestefanello/pagoda/ent/user" - + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/stretchr/testify/assert" + "git.grosinger.net/tgrosinger/saasitone/ent/passwordtoken" + "git.grosinger.net/tgrosinger/saasitone/ent/user" ) func TestAuthClient_Auth(t *testing.T) { diff --git a/pkg/services/container.go b/pkg/services/container.go index 798cc63..56cc9b5 100644 --- a/pkg/services/container.go +++ b/pkg/services/container.go @@ -9,15 +9,13 @@ import ( "strings" entsql "entgo.io/ent/dialect/sql" - _ "github.com/mattn/go-sqlite3" - "github.com/mikestefanello/pagoda/pkg/funcmap" - "github.com/labstack/echo/v4" - "github.com/mikestefanello/pagoda/config" - "github.com/mikestefanello/pagoda/ent" + _ "github.com/mattn/go-sqlite3" - // Require by ent - _ "github.com/mikestefanello/pagoda/ent/runtime" + "git.grosinger.net/tgrosinger/saasitone/config" + "git.grosinger.net/tgrosinger/saasitone/ent" + _ "git.grosinger.net/tgrosinger/saasitone/ent/runtime" // Require by ent + "git.grosinger.net/tgrosinger/saasitone/pkg/funcmap" ) // Container contains all services used by the application and provides an easy way to handle dependency diff --git a/pkg/services/mail.go b/pkg/services/mail.go index b4b21c3..b1a9b0b 100644 --- a/pkg/services/mail.go +++ b/pkg/services/mail.go @@ -4,10 +4,10 @@ import ( "errors" "fmt" - "github.com/mikestefanello/pagoda/config" - "github.com/mikestefanello/pagoda/pkg/log" - "github.com/labstack/echo/v4" + + "git.grosinger.net/tgrosinger/saasitone/config" + "git.grosinger.net/tgrosinger/saasitone/pkg/log" ) type ( @@ -75,7 +75,6 @@ func (m *MailClient) send(email *mail, ctx echo.Context) error { Base(email.template). Files(fmt.Sprintf("emails/%s", email.template)). Execute(email.templateData) - if err != nil { return err } diff --git a/pkg/services/services_test.go b/pkg/services/services_test.go index 50b39fe..45c9ed4 100644 --- a/pkg/services/services_test.go +++ b/pkg/services/services_test.go @@ -4,11 +4,11 @@ import ( "os" "testing" - "github.com/mikestefanello/pagoda/config" - "github.com/mikestefanello/pagoda/ent" - "github.com/mikestefanello/pagoda/pkg/tests" - "github.com/labstack/echo/v4" + + "git.grosinger.net/tgrosinger/saasitone/config" + "git.grosinger.net/tgrosinger/saasitone/ent" + "git.grosinger.net/tgrosinger/saasitone/pkg/tests" ) var ( diff --git a/pkg/services/tasks.go b/pkg/services/tasks.go index e399144..547e282 100644 --- a/pkg/services/tasks.go +++ b/pkg/services/tasks.go @@ -11,8 +11,9 @@ import ( "github.com/maragudk/goqite" "github.com/maragudk/goqite/jobs" - "github.com/mikestefanello/pagoda/config" - "github.com/mikestefanello/pagoda/pkg/log" + + "git.grosinger.net/tgrosinger/saasitone/config" + "git.grosinger.net/tgrosinger/saasitone/pkg/log" ) type ( diff --git a/pkg/services/template_renderer.go b/pkg/services/template_renderer.go index 92cb172..ef73097 100644 --- a/pkg/services/template_renderer.go +++ b/pkg/services/template_renderer.go @@ -10,11 +10,12 @@ import ( "sync" "github.com/labstack/echo/v4" - "github.com/mikestefanello/pagoda/config" - "github.com/mikestefanello/pagoda/pkg/context" - "github.com/mikestefanello/pagoda/pkg/log" - "github.com/mikestefanello/pagoda/pkg/page" - "github.com/mikestefanello/pagoda/templates" + + "git.grosinger.net/tgrosinger/saasitone/config" + "git.grosinger.net/tgrosinger/saasitone/pkg/context" + "git.grosinger.net/tgrosinger/saasitone/pkg/log" + "git.grosinger.net/tgrosinger/saasitone/pkg/page" + "git.grosinger.net/tgrosinger/saasitone/templates" ) // cachedPageGroup stores the cache group for cached pages @@ -138,7 +139,6 @@ func (t *TemplateRenderer) RenderPage(ctx echo.Context, page page.Page) error { ). Directories("components"). Execute(page) - if err != nil { return echo.NewHTTPError( http.StatusInternalServerError, @@ -218,7 +218,6 @@ func (t *TemplateRenderer) GetCachedPage(ctx echo.Context, url string) (*CachedP Group(cachedPageGroup). Key(url). Fetch(ctx.Request().Context()) - if err != nil { return nil, err } diff --git a/pkg/services/template_renderer_test.go b/pkg/services/template_renderer_test.go index d9c6633..7411ca1 100644 --- a/pkg/services/template_renderer_test.go +++ b/pkg/services/template_renderer_test.go @@ -8,14 +8,14 @@ import ( "testing" "github.com/labstack/echo/v4" - "github.com/mikestefanello/pagoda/config" - "github.com/mikestefanello/pagoda/pkg/htmx" - "github.com/mikestefanello/pagoda/pkg/page" - "github.com/mikestefanello/pagoda/pkg/tests" - "github.com/mikestefanello/pagoda/templates" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "git.grosinger.net/tgrosinger/saasitone/config" + "git.grosinger.net/tgrosinger/saasitone/pkg/htmx" + "git.grosinger.net/tgrosinger/saasitone/pkg/page" + "git.grosinger.net/tgrosinger/saasitone/pkg/tests" + "git.grosinger.net/tgrosinger/saasitone/templates" ) func TestTemplateRenderer(t *testing.T) { diff --git a/pkg/session/session.go b/pkg/session/session.go index 56fe573..b209bae 100644 --- a/pkg/session/session.go +++ b/pkg/session/session.go @@ -3,9 +3,9 @@ package session import ( "errors" + "git.grosinger.net/tgrosinger/saasitone/pkg/context" "github.com/gorilla/sessions" "github.com/labstack/echo/v4" - "github.com/mikestefanello/pagoda/pkg/context" ) // ErrStoreNotFound indicates that the session store was not present in the context diff --git a/pkg/tasks/example.go b/pkg/tasks/example.go index 3ef4b60..0a6019b 100644 --- a/pkg/tasks/example.go +++ b/pkg/tasks/example.go @@ -3,8 +3,8 @@ package tasks import ( "context" - "github.com/mikestefanello/pagoda/pkg/log" - "github.com/mikestefanello/pagoda/pkg/services" + "git.grosinger.net/tgrosinger/saasitone/pkg/log" + "git.grosinger.net/tgrosinger/saasitone/pkg/services" ) // ExampleTask is an example implementation of services.Task diff --git a/pkg/tasks/register.go b/pkg/tasks/register.go index 895b974..176ffa3 100644 --- a/pkg/tasks/register.go +++ b/pkg/tasks/register.go @@ -1,7 +1,7 @@ package tasks import ( - "github.com/mikestefanello/pagoda/pkg/services" + "git.grosinger.net/tgrosinger/saasitone/pkg/services" ) // Register registers all task queues with the task client diff --git a/pkg/tests/tests.go b/pkg/tests/tests.go index 17dec0d..27ab923 100644 --- a/pkg/tests/tests.go +++ b/pkg/tests/tests.go @@ -10,14 +10,14 @@ import ( "testing" "time" - "github.com/mikestefanello/pagoda/ent" - "github.com/mikestefanello/pagoda/pkg/session" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/gorilla/sessions" "github.com/labstack/echo/v4" + + "git.grosinger.net/tgrosinger/saasitone/ent" + "git.grosinger.net/tgrosinger/saasitone/pkg/session" ) // NewContext creates a new Echo context for tests using an HTTP test request and response recorder