chore(provider): use type assertion for port forwarders

This commit is contained in:
Quentin McGaw
2023-09-23 13:02:09 +00:00
parent 84300db7c1
commit aa6dc786a4
29 changed files with 129 additions and 185 deletions

View File

@@ -7,13 +7,11 @@ import (
"github.com/qdm12/gluetun/internal/constants/providers"
"github.com/qdm12/gluetun/internal/provider/common"
"github.com/qdm12/gluetun/internal/provider/slickvpn/updater"
"github.com/qdm12/gluetun/internal/provider/utils"
)
type Provider struct {
storage common.Storage
randSource rand.Source
utils.NoPortForwarder
common.Fetcher
}
@@ -21,10 +19,9 @@ func New(storage common.Storage, randSource rand.Source,
client *http.Client, updaterWarner common.Warner,
parallelResolver common.ParallelResolver) *Provider {
return &Provider{
storage: storage,
randSource: randSource,
NoPortForwarder: utils.NewNoPortForwarding(providers.SlickVPN),
Fetcher: updater.New(client, updaterWarner, parallelResolver),
storage: storage,
randSource: randSource,
Fetcher: updater.New(client, updaterWarner, parallelResolver),
}
}