chore(updater): tiny code changes

- Remove unneeded ctx error check in cyberghost updating code
- Move global scope caser to function local scope
- Return error if updating a single provider in `UpdateServers`
- Add comments on different error paths in `UpdateServers`
This commit is contained in:
Quentin McGaw
2022-06-03 13:01:29 +00:00
parent 87c6ebe1c5
commit 0549326dfb
3 changed files with 17 additions and 13 deletions

View File

@@ -98,8 +98,7 @@ func (u *Updater) getServers(ctx context.Context, provider string,
panic("provider " + provider + " is unknown")
}
servers, err = providerUpdater.GetServers(ctx, minServers)
return servers, err
return providerUpdater.GetServers(ctx, minServers)
}
func (u *Updater) getProviderServers(provider string) (servers []models.Server) {