chore(constants): internal/constants/providers

- New package to avoid package import cycles
This commit is contained in:
Quentin McGaw
2022-04-16 19:30:26 +00:00
parent ad80e0c1ab
commit 54b7e23974
51 changed files with 335 additions and 339 deletions

View File

@@ -14,6 +14,7 @@ import (
"github.com/qdm12/gluetun/internal/configuration/settings"
"github.com/qdm12/gluetun/internal/constants"
"github.com/qdm12/gluetun/internal/constants/providers"
"github.com/qdm12/gluetun/internal/models"
"github.com/qdm12/gluetun/internal/storage"
"github.com/qdm12/gluetun/internal/updater"
@@ -62,8 +63,8 @@ func (c *CLI) Update(ctx context.Context, args []string, logger UpdaterLogger) e
}
if updateAll {
for _, provider := range constants.AllProviders() {
if provider == constants.Custom {
for _, provider := range providers.All() {
if provider == providers.Custom {
continue
}
options.Providers = append(options.Providers, provider)