From c149320fdaaf615925a13087122f0604739f82cc Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Mon, 22 Nov 2021 17:31:05 +0100 Subject: [PATCH] Lint: Fix import sorting Signed-off-by: Knut Ahlers --- api.go | 7 ++++--- internal/config/config.go | 5 +++-- internal/database/store.go | 3 ++- internal/fetcher/git.go | 5 +++-- internal/fetcher/github.go | 3 ++- internal/fetcher/html.go | 5 +++-- internal/fetcher/interface.go | 3 ++- scheduler.go | 5 +++-- 8 files changed, 22 insertions(+), 14 deletions(-) diff --git a/api.go b/api.go index bca5ddb..c97164b 100644 --- a/api.go +++ b/api.go @@ -9,13 +9,14 @@ import ( "strings" "time" - "github.com/Luzifer/go-latestver/internal/config" - "github.com/Luzifer/go-latestver/internal/database" - "github.com/Luzifer/go-latestver/internal/fetcher" "github.com/gorilla/feeds" "github.com/gorilla/mux" "github.com/pkg/errors" log "github.com/sirupsen/logrus" + + "github.com/Luzifer/go-latestver/internal/config" + "github.com/Luzifer/go-latestver/internal/database" + "github.com/Luzifer/go-latestver/internal/fetcher" ) func buildFullURL(u *url.URL) string { diff --git a/internal/config/config.go b/internal/config/config.go index 9a4835b..5fb4f3a 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -4,10 +4,11 @@ import ( "os" "time" - "github.com/Luzifer/go-latestver/internal/database" - "github.com/Luzifer/go-latestver/internal/fetcher" "github.com/pkg/errors" "gopkg.in/yaml.v3" + + "github.com/Luzifer/go-latestver/internal/database" + "github.com/Luzifer/go-latestver/internal/fetcher" ) var ErrCatalogEntryNotFound = errors.New("catalog entry not found") diff --git a/internal/database/store.go b/internal/database/store.go index cd2d8f8..da78241 100644 --- a/internal/database/store.go +++ b/internal/database/store.go @@ -5,10 +5,11 @@ import ( "strings" "time" - "github.com/Luzifer/go_helpers/v2/fieldcollection" "github.com/pkg/errors" "gorm.io/gorm" "gorm.io/gorm/clause" + + "github.com/Luzifer/go_helpers/v2/fieldcollection" ) type ( diff --git a/internal/fetcher/git.go b/internal/fetcher/git.go index 2649409..2ece4e1 100644 --- a/internal/fetcher/git.go +++ b/internal/fetcher/git.go @@ -4,13 +4,14 @@ import ( "context" "time" - "github.com/Luzifer/go-latestver/internal/database" - "github.com/Luzifer/go_helpers/v2/fieldcollection" "github.com/go-git/go-git/v5" "github.com/go-git/go-git/v5/config" "github.com/go-git/go-git/v5/plumbing" "github.com/go-git/go-git/v5/storage/memory" "github.com/pkg/errors" + + "github.com/Luzifer/go-latestver/internal/database" + "github.com/Luzifer/go_helpers/v2/fieldcollection" ) type ( diff --git a/internal/fetcher/github.go b/internal/fetcher/github.go index 60c5de2..9cd51c6 100644 --- a/internal/fetcher/github.go +++ b/internal/fetcher/github.go @@ -8,9 +8,10 @@ import ( "os" "time" + "github.com/pkg/errors" + "github.com/Luzifer/go-latestver/internal/database" "github.com/Luzifer/go_helpers/v2/fieldcollection" - "github.com/pkg/errors" ) const githubHTTPTimeout = 2 * time.Second diff --git a/internal/fetcher/html.go b/internal/fetcher/html.go index a701834..b920baf 100644 --- a/internal/fetcher/html.go +++ b/internal/fetcher/html.go @@ -5,12 +5,13 @@ import ( "regexp" "time" - "github.com/Luzifer/go-latestver/internal/database" - "github.com/Luzifer/go_helpers/v2/fieldcollection" "github.com/antchfx/htmlquery" "github.com/antchfx/xpath" "github.com/pkg/errors" "golang.org/x/net/html" + + "github.com/Luzifer/go-latestver/internal/database" + "github.com/Luzifer/go_helpers/v2/fieldcollection" ) var htmlFetcherDefaultRegex = `(v?(?:[0-9]+\.?){2,})` diff --git a/internal/fetcher/interface.go b/internal/fetcher/interface.go index 5c92836..da25ced 100644 --- a/internal/fetcher/interface.go +++ b/internal/fetcher/interface.go @@ -5,9 +5,10 @@ import ( "sync" "time" + "github.com/pkg/errors" + "github.com/Luzifer/go-latestver/internal/database" "github.com/Luzifer/go_helpers/v2/fieldcollection" - "github.com/pkg/errors" ) type ( diff --git a/scheduler.go b/scheduler.go index afc3a44..0eebd3b 100644 --- a/scheduler.go +++ b/scheduler.go @@ -5,10 +5,11 @@ import ( "strings" "time" - "github.com/Luzifer/go-latestver/internal/database" - "github.com/Luzifer/go-latestver/internal/fetcher" "github.com/pkg/errors" log "github.com/sirupsen/logrus" + + "github.com/Luzifer/go-latestver/internal/database" + "github.com/Luzifer/go-latestver/internal/fetcher" ) var schedulerRunActive bool