chore(updater): common GetServers signature

- Log warnings when running outside of CLI mode
- Remove updater CLI bool setting
- Warnings are logged in updating functions
This commit is contained in:
Quentin McGaw
2022-05-28 20:58:50 +00:00
parent 381089ebdf
commit 90c6c8485b
50 changed files with 896 additions and 325 deletions

View File

@@ -0,0 +1,19 @@
package perfectprivacy
import "github.com/qdm12/gluetun/internal/updater/unzip"
type Updater struct {
unzipper unzip.Unzipper
warner Warner
}
type Warner interface {
Warn(s string)
}
func New(unzipper unzip.Unzipper, warner Warner) *Updater {
return &Updater{
unzipper: unzipper,
warner: warner,
}
}