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,21 @@
package protonvpn
import (
"net/http"
)
type Updater struct {
client *http.Client
warner Warner
}
type Warner interface {
Warn(s string)
}
func New(client *http.Client, warner Warner) *Updater {
return &Updater{
client: client,
warner: warner,
}
}