diff --git a/cmd/gotosocial/main.go b/cmd/gotosocial/main.go index 4d721f540..a85093802 100644 --- a/cmd/gotosocial/main.go +++ b/cmd/gotosocial/main.go @@ -22,12 +22,12 @@ import ( "fmt" "os" + "github.com/sirupsen/logrus" "github.com/superseriousbusiness/gotosocial/internal/action" "github.com/superseriousbusiness/gotosocial/internal/config" "github.com/superseriousbusiness/gotosocial/internal/db" "github.com/superseriousbusiness/gotosocial/internal/gotosocial" "github.com/superseriousbusiness/gotosocial/internal/log" - "github.com/sirupsen/logrus" "github.com/urfave/cli/v2" ) diff --git a/internal/action/action.go b/internal/action/action.go index ce64d6d85..de803ba7c 100644 --- a/internal/action/action.go +++ b/internal/action/action.go @@ -21,8 +21,8 @@ package action import ( "context" - "github.com/superseriousbusiness/gotosocial/internal/config" "github.com/sirupsen/logrus" + "github.com/superseriousbusiness/gotosocial/internal/config" ) // GTSAction defines one *action* that can be taken by the gotosocial cli command. diff --git a/internal/db/actions.go b/internal/db/actions.go index c2d8f76c1..4288f5fdb 100644 --- a/internal/db/actions.go +++ b/internal/db/actions.go @@ -21,9 +21,9 @@ package db import ( "context" + "github.com/sirupsen/logrus" "github.com/superseriousbusiness/gotosocial/internal/action" "github.com/superseriousbusiness/gotosocial/internal/config" - "github.com/sirupsen/logrus" ) // Initialize will initialize the database given in the config for use with GoToSocial diff --git a/internal/db/db.go b/internal/db/db.go index dcd7cf89b..f6c298b97 100644 --- a/internal/db/db.go +++ b/internal/db/db.go @@ -25,10 +25,10 @@ import ( "strings" "github.com/go-fed/activity/pub" + "github.com/sirupsen/logrus" "github.com/superseriousbusiness/gotosocial/internal/config" "github.com/superseriousbusiness/gotosocial/internal/db/model" "github.com/superseriousbusiness/gotosocial/pkg/mastotypes" - "github.com/sirupsen/logrus" ) const dbTypePostgres string = "POSTGRES" diff --git a/internal/db/pg.go b/internal/db/pg.go index 621f3a697..679011401 100644 --- a/internal/db/pg.go +++ b/internal/db/pg.go @@ -34,10 +34,10 @@ import ( "github.com/go-pg/pg/extra/pgdebug" "github.com/go-pg/pg/v10" "github.com/go-pg/pg/v10/orm" + "github.com/sirupsen/logrus" "github.com/superseriousbusiness/gotosocial/internal/config" "github.com/superseriousbusiness/gotosocial/internal/db/model" "github.com/superseriousbusiness/gotosocial/pkg/mastotypes" - "github.com/sirupsen/logrus" "golang.org/x/crypto/bcrypt" ) @@ -439,11 +439,11 @@ func (ps *postgresService) NewSignup(username string, reason string, requireAppr return nil, fmt.Errorf("error hashing password: %s", err) } u := &model.User{ - AccountID: a.ID, - EncryptedPassword: string(pw), - SignUpIP: signUpIP, - Locale: locale, - UnconfirmedEmail: email, + AccountID: a.ID, + EncryptedPassword: string(pw), + SignUpIP: signUpIP, + Locale: locale, + UnconfirmedEmail: email, CreatedByApplicationID: appID, } if _, err = ps.conn.Model(u).Insert(); err != nil { diff --git a/internal/gotosocial/actions.go b/internal/gotosocial/actions.go index d9419d6bb..c348af31d 100644 --- a/internal/gotosocial/actions.go +++ b/internal/gotosocial/actions.go @@ -25,10 +25,10 @@ import ( "os/signal" "syscall" + "github.com/sirupsen/logrus" "github.com/superseriousbusiness/gotosocial/internal/action" "github.com/superseriousbusiness/gotosocial/internal/config" "github.com/superseriousbusiness/gotosocial/internal/db" - "github.com/sirupsen/logrus" ) // Run creates and starts a gotosocial server diff --git a/internal/module/account/account.go b/internal/module/account/account.go index e68fdb365..ac4c51782 100644 --- a/internal/module/account/account.go +++ b/internal/module/account/account.go @@ -24,6 +24,7 @@ import ( "net/http" "github.com/gin-gonic/gin" + "github.com/sirupsen/logrus" "github.com/superseriousbusiness/gotosocial/internal/config" "github.com/superseriousbusiness/gotosocial/internal/db" "github.com/superseriousbusiness/gotosocial/internal/db/model" @@ -32,7 +33,6 @@ import ( "github.com/superseriousbusiness/gotosocial/internal/router" "github.com/superseriousbusiness/gotosocial/pkg/mastotypes" "github.com/superseriousbusiness/oauth2/v4" - "github.com/sirupsen/logrus" ) const ( @@ -51,10 +51,10 @@ type accountModule struct { // New returns a new account module func New(config *config.Config, db db.DB, oauthServer oauth.Server, log *logrus.Logger) module.ClientAPIModule { return &accountModule{ - config: config, - db: db, + config: config, + db: db, oauthServer: oauthServer, - log: log, + log: log, } } diff --git a/internal/module/app/app.go b/internal/module/app/app.go index fb758146f..67614a027 100644 --- a/internal/module/app/app.go +++ b/internal/module/app/app.go @@ -24,13 +24,13 @@ import ( "github.com/gin-gonic/gin" "github.com/google/uuid" + "github.com/sirupsen/logrus" "github.com/superseriousbusiness/gotosocial/internal/db" "github.com/superseriousbusiness/gotosocial/internal/db/model" "github.com/superseriousbusiness/gotosocial/internal/module" "github.com/superseriousbusiness/gotosocial/internal/oauth" "github.com/superseriousbusiness/gotosocial/internal/router" "github.com/superseriousbusiness/gotosocial/pkg/mastotypes" - "github.com/sirupsen/logrus" ) const appsPath = "/api/v1/apps" diff --git a/internal/module/auth/auth.go b/internal/module/auth/auth.go index e92edb46d..0e7a3339f 100644 --- a/internal/module/auth/auth.go +++ b/internal/module/auth/auth.go @@ -32,13 +32,13 @@ import ( "github.com/gin-contrib/sessions" "github.com/gin-gonic/gin" + "github.com/sirupsen/logrus" "github.com/superseriousbusiness/gotosocial/internal/db" "github.com/superseriousbusiness/gotosocial/internal/db/model" "github.com/superseriousbusiness/gotosocial/internal/module" "github.com/superseriousbusiness/gotosocial/internal/oauth" "github.com/superseriousbusiness/gotosocial/internal/router" "github.com/superseriousbusiness/gotosocial/pkg/mastotypes" - "github.com/sirupsen/logrus" "golang.org/x/crypto/bcrypt" ) diff --git a/internal/module/auth/auth_test.go b/internal/module/auth/auth_test.go index 7a01963f2..0ec9b4a41 100644 --- a/internal/module/auth/auth_test.go +++ b/internal/module/auth/auth_test.go @@ -25,13 +25,13 @@ import ( "time" "github.com/google/uuid" + "github.com/sirupsen/logrus" + "github.com/stretchr/testify/suite" "github.com/superseriousbusiness/gotosocial/internal/config" "github.com/superseriousbusiness/gotosocial/internal/db" "github.com/superseriousbusiness/gotosocial/internal/db/model" "github.com/superseriousbusiness/gotosocial/internal/oauth" "github.com/superseriousbusiness/gotosocial/internal/router" - "github.com/sirupsen/logrus" - "github.com/stretchr/testify/suite" "golang.org/x/crypto/bcrypt" ) diff --git a/internal/oauth/clientstore_test.go b/internal/oauth/clientstore_test.go index 6b25bc3a4..a7028228d 100644 --- a/internal/oauth/clientstore_test.go +++ b/internal/oauth/clientstore_test.go @@ -21,11 +21,11 @@ import ( "context" "testing" + "github.com/sirupsen/logrus" + "github.com/stretchr/testify/suite" "github.com/superseriousbusiness/gotosocial/internal/config" "github.com/superseriousbusiness/gotosocial/internal/db" "github.com/superseriousbusiness/oauth2/v4/models" - "github.com/sirupsen/logrus" - "github.com/stretchr/testify/suite" ) type PgClientStoreTestSuite struct { diff --git a/internal/oauth/tokenstore.go b/internal/oauth/tokenstore.go index 9b9fb9547..eaf6e0a99 100644 --- a/internal/oauth/tokenstore.go +++ b/internal/oauth/tokenstore.go @@ -24,10 +24,10 @@ import ( "fmt" "time" + "github.com/sirupsen/logrus" "github.com/superseriousbusiness/gotosocial/internal/db" "github.com/superseriousbusiness/oauth2/v4" "github.com/superseriousbusiness/oauth2/v4/models" - "github.com/sirupsen/logrus" ) // tokenStore is an implementation of oauth2.TokenStore, which uses our db interface as a storage backend. diff --git a/internal/router/router.go b/internal/router/router.go index 0e1768a5b..b60e21584 100644 --- a/internal/router/router.go +++ b/internal/router/router.go @@ -29,8 +29,8 @@ import ( "github.com/gin-contrib/sessions" "github.com/gin-contrib/sessions/memstore" "github.com/gin-gonic/gin" - "github.com/superseriousbusiness/gotosocial/internal/config" "github.com/sirupsen/logrus" + "github.com/superseriousbusiness/gotosocial/internal/config" ) // Router provides the REST interface for gotosocial, using gin.