Maint: hardcoded data in JSON embedded file

- Server information, versions and timestamps together in internal/constants/servers.json
- breaking change: updater cli uses -enduser instead of -file
- breaking change: updater cli uses -maintainer instead of -stdout
- Fix: replace special last a character with 'a' from Bogota for PrivateVPN
- Feat: do not write out servers and timestamp if no change was detected
This commit is contained in:
Quentin McGaw (desktop)
2021-07-20 03:01:26 +00:00
parent 394abbbe35
commit da4d528463
49 changed files with 109965 additions and 12159 deletions

View File

@@ -3,7 +3,6 @@ package updater
import (
"context"
"fmt"
"net/http"
"time"
@@ -29,7 +28,6 @@ type updater struct {
// Functions for tests
logger logging.Logger
timeNow func() time.Time
println func(s string)
presolver resolver.Parallel
client *http.Client
unzipper unzip.Unzipper
@@ -44,7 +42,6 @@ func New(settings configuration.Updater, httpClient *http.Client,
return &updater{
logger: logger,
timeNow: time.Now,
println: func(s string) { fmt.Println(s) },
presolver: resolver.NewParallelResolver(settings.DNSAddress),
client: httpClient,
unzipper: unzipper,