diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-11-24 15:40:39 +0100 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-11-24 15:40:39 +0100 |
| commit | 8be555e5f91c6069c3d51cb014f1849fd182b1dc (patch) | |
| tree | 9c78f2ee1f5122da1e1ed3e452682f7f6744778f /internal/discovery | |
| parent | 791fffebff4499e4fad3217e2160596e1b8b3eea (diff) | |
Style: Use stylecheck and fix errors
Diffstat (limited to 'internal/discovery')
| -rw-r--r-- | internal/discovery/discovery.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/discovery/discovery.go b/internal/discovery/discovery.go index 01978fe..b0b20fa 100644 --- a/internal/discovery/discovery.go +++ b/internal/discovery/discovery.go @@ -113,7 +113,7 @@ func (discovery *Discovery) GetServerByCountryCode( func (discovery *Discovery) getOrgByID(orgID string) (*types.DiscoveryOrganization, error) { for _, organization := range discovery.Organizations.List { - if organization.OrgId == orgID { + if organization.OrgID == orgID { return &organization, nil } } @@ -153,9 +153,9 @@ func (discovery *Discovery) DetermineServersUpdate() bool { return true } // 1 hour from the last update - should_update_time := discovery.Servers.Timestamp.Add(1 * time.Hour) + shouldUpdateTime := discovery.Servers.Timestamp.Add(1 * time.Hour) now := time.Now() - return !now.Before(should_update_time) + return !now.Before(shouldUpdateTime) } // Get the organization list |
