chore(storage): minor refactoring

- Unexport `SyncServers`
- Re-generate mock file
- Remove single use function
This commit is contained in:
Quentin McGaw
2022-05-28 22:51:19 +00:00
parent b345368257
commit 8e1316bd8a
8 changed files with 64 additions and 65 deletions

View File

@@ -5,8 +5,6 @@ import (
"github.com/qdm12/gluetun/internal/models"
)
//go:generate mockgen -destination=infoerrorer_mock_test.go -package $GOPACKAGE . InfoErrorer
type Storage struct {
mergedServers models.AllServers
// this is stored in memory to avoid re-parsing
@@ -35,7 +33,7 @@ func New(logger Infoer, filepath string) (storage *Storage, err error) {
filepath: filepath,
}
if err := storage.SyncServers(); err != nil {
if err := storage.syncServers(); err != nil {
return nil, err
}