From f43eebd0ce760afcf1ede677c16ec6a4ce77b1ec Mon Sep 17 00:00:00 2001 From: Leander Beernaert Date: Mon, 26 Jun 2023 16:30:49 +0200 Subject: [PATCH] chore: Fix go imports --- db/client.go | 3 ++- internal/db_impl/sqlite3/client.go | 2 +- internal/db_impl/sqlite3/migration_test.go | 7 ++++--- internal/db_impl/sqlite3/migrations.go | 4 ++-- internal/db_impl/sqlite3/read_ops.go | 2 +- internal/db_impl/sqlite3/v0/migration.go | 2 +- internal/db_impl/sqlite3/v1/mailbox.go | 3 ++- internal/db_impl/sqlite3/v1/migration.go | 3 ++- internal/db_impl/sqlite3/write_ops.go | 2 +- 9 files changed, 16 insertions(+), 12 deletions(-) diff --git a/db/client.go b/db/client.go index be35e536..d1ff7a95 100644 --- a/db/client.go +++ b/db/client.go @@ -2,8 +2,9 @@ package db import ( "context" - "github.com/ProtonMail/gluon/imap" "path/filepath" + + "github.com/ProtonMail/gluon/imap" ) const ChunkLimit = 1000 diff --git a/internal/db_impl/sqlite3/client.go b/internal/db_impl/sqlite3/client.go index 3afb8999..9daee010 100644 --- a/internal/db_impl/sqlite3/client.go +++ b/internal/db_impl/sqlite3/client.go @@ -5,13 +5,13 @@ import ( "database/sql" "errors" "fmt" - "github.com/ProtonMail/gluon/imap" "io/fs" "os" "path/filepath" "sync" "github.com/ProtonMail/gluon/db" + "github.com/ProtonMail/gluon/imap" "github.com/ProtonMail/gluon/internal/db_impl/sqlite3/utils" gluon_utils "github.com/ProtonMail/gluon/internal/utils" "github.com/ProtonMail/gluon/reporter" diff --git a/internal/db_impl/sqlite3/migration_test.go b/internal/db_impl/sqlite3/migration_test.go index 940d86a9..b1529a4b 100644 --- a/internal/db_impl/sqlite3/migration_test.go +++ b/internal/db_impl/sqlite3/migration_test.go @@ -5,6 +5,10 @@ import ( "database/sql" "errors" "fmt" + "strings" + "testing" + "time" + "github.com/ProtonMail/gluon/db" "github.com/ProtonMail/gluon/imap" "github.com/ProtonMail/gluon/internal/db_impl/sqlite3/utils" @@ -13,9 +17,6 @@ import ( "github.com/sirupsen/logrus" "github.com/stretchr/testify/require" "golang.org/x/exp/slices" - "strings" - "testing" - "time" ) func TestMigration_VersionTooHigh(t *testing.T) { diff --git a/internal/db_impl/sqlite3/migrations.go b/internal/db_impl/sqlite3/migrations.go index 8f133b32..79ede75f 100644 --- a/internal/db_impl/sqlite3/migrations.go +++ b/internal/db_impl/sqlite3/migrations.go @@ -4,12 +4,12 @@ import ( "context" "errors" "fmt" - "github.com/ProtonMail/gluon/imap" - v1 "github.com/ProtonMail/gluon/internal/db_impl/sqlite3/v1" "github.com/ProtonMail/gluon/db" + "github.com/ProtonMail/gluon/imap" "github.com/ProtonMail/gluon/internal/db_impl/sqlite3/utils" v0 "github.com/ProtonMail/gluon/internal/db_impl/sqlite3/v0" + v1 "github.com/ProtonMail/gluon/internal/db_impl/sqlite3/v1" "github.com/sirupsen/logrus" ) diff --git a/internal/db_impl/sqlite3/read_ops.go b/internal/db_impl/sqlite3/read_ops.go index 817fccb1..2b2f9f14 100644 --- a/internal/db_impl/sqlite3/read_ops.go +++ b/internal/db_impl/sqlite3/read_ops.go @@ -5,13 +5,13 @@ import ( "database/sql" "errors" "fmt" - v1 "github.com/ProtonMail/gluon/internal/db_impl/sqlite3/v1" "strings" "time" "github.com/ProtonMail/gluon/db" "github.com/ProtonMail/gluon/imap" "github.com/ProtonMail/gluon/internal/db_impl/sqlite3/utils" + v1 "github.com/ProtonMail/gluon/internal/db_impl/sqlite3/v1" "github.com/bradenaw/juniper/xmaps" "github.com/bradenaw/juniper/xslices" ) diff --git a/internal/db_impl/sqlite3/v0/migration.go b/internal/db_impl/sqlite3/v0/migration.go index bd52c760..606715e1 100644 --- a/internal/db_impl/sqlite3/v0/migration.go +++ b/internal/db_impl/sqlite3/v0/migration.go @@ -3,8 +3,8 @@ package v0 import ( "context" "fmt" - "github.com/ProtonMail/gluon/imap" + "github.com/ProtonMail/gluon/imap" "github.com/ProtonMail/gluon/internal/db_impl/sqlite3/utils" "github.com/bradenaw/juniper/xmaps" "github.com/bradenaw/juniper/xslices" diff --git a/internal/db_impl/sqlite3/v1/mailbox.go b/internal/db_impl/sqlite3/v1/mailbox.go index d4873ae7..3a341cbc 100644 --- a/internal/db_impl/sqlite3/v1/mailbox.go +++ b/internal/db_impl/sqlite3/v1/mailbox.go @@ -3,12 +3,13 @@ package v1 import ( "context" "fmt" + "strings" + "github.com/ProtonMail/gluon/db" "github.com/ProtonMail/gluon/imap" "github.com/ProtonMail/gluon/internal/db_impl/sqlite3/utils" v0 "github.com/ProtonMail/gluon/internal/db_impl/sqlite3/v0" "github.com/bradenaw/juniper/xslices" - "strings" ) type mailboxV0 struct { diff --git a/internal/db_impl/sqlite3/v1/migration.go b/internal/db_impl/sqlite3/v1/migration.go index 12d49065..b19f363e 100644 --- a/internal/db_impl/sqlite3/v1/migration.go +++ b/internal/db_impl/sqlite3/v1/migration.go @@ -3,12 +3,13 @@ package v1 import ( "context" "fmt" + "strings" + "github.com/ProtonMail/gluon/db" "github.com/ProtonMail/gluon/imap" "github.com/ProtonMail/gluon/internal/db_impl/sqlite3/utils" v0 "github.com/ProtonMail/gluon/internal/db_impl/sqlite3/v0" "github.com/bradenaw/juniper/xslices" - "strings" ) type Migration struct{} diff --git a/internal/db_impl/sqlite3/write_ops.go b/internal/db_impl/sqlite3/write_ops.go index 7233f980..0abf7d80 100644 --- a/internal/db_impl/sqlite3/write_ops.go +++ b/internal/db_impl/sqlite3/write_ops.go @@ -4,12 +4,12 @@ import ( "context" "errors" "fmt" - v1 "github.com/ProtonMail/gluon/internal/db_impl/sqlite3/v1" "strings" "github.com/ProtonMail/gluon/db" "github.com/ProtonMail/gluon/imap" "github.com/ProtonMail/gluon/internal/db_impl/sqlite3/utils" + v1 "github.com/ProtonMail/gluon/internal/db_impl/sqlite3/v1" "github.com/bradenaw/juniper/xslices" )