diff options
Diffstat (limited to 'internal/discovery/discovery.go')
| -rw-r--r-- | internal/discovery/discovery.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/internal/discovery/discovery.go b/internal/discovery/discovery.go index 487d39a..d68b3ba 100644 --- a/internal/discovery/discovery.go +++ b/internal/discovery/discovery.go @@ -21,12 +21,13 @@ type Discovery struct { servers types.DiscoveryServers } +var DiscoURL string = "https://disco.eduvpn.org/v2/" + // discoFile is a helper function that gets a disco JSON and fills the structure with it // If it was unsuccessful it returns an error. func discoFile(jsonFile string, previousVersion uint64, structure interface{}) error { // Get json data - URL := "https://disco.eduvpn.org/v2/" - jsonURL := URL + jsonFile + jsonURL := DiscoURL + jsonFile _, body, err := http.Get(jsonURL) if err != nil { return err @@ -34,7 +35,7 @@ func discoFile(jsonFile string, previousVersion uint64, structure interface{}) e // Get signature sigFile := jsonFile + ".minisig" - sigURL := URL + sigFile + sigURL := DiscoURL + sigFile _, sigBody, err := http.Get(sigURL) if err != nil { return err |
