diff --git a/models.go b/models.go index 4b69198..1a84149 100644 --- a/models.go +++ b/models.go @@ -34,21 +34,21 @@ type torRelayScanner struct { } type ( - Version string - BuildRevision string - RelaysPublished string - BridgesPublished string - Bridges []any + version string + buildRevision string + relaysPublished string + bridgesPublished string + bridges []any ) // RelayInfo struct with basics information relay lists type RelayInfo struct { - Version Version - BuildRevision BuildRevision `json:"build_revision"` - RelaysPublished RelaysPublished `json:"relays_published"` + Version version + BuildRevision buildRevision `json:"build_revision"` + RelaysPublished relaysPublished `json:"relays_published"` Relays Relays `json:"relays"` - BridgesPublished BridgesPublished `json:"bridges_published"` - Bridges Bridges `json:"bridges"` + BridgesPublished bridgesPublished `json:"bridges_published"` + Bridges bridges `json:"bridges"` } // Relays ... diff --git a/scanner.go b/scanner.go index e178212..126f15f 100644 --- a/scanner.go +++ b/scanner.go @@ -150,7 +150,7 @@ func (t *torRelayScanner) GetRelays() ([]byte, error) { RelaysPublished: t.relayInfo.RelaysPublished, Relays: relays, BridgesPublished: t.relayInfo.BridgesPublished, - Bridges: Bridges{}, + Bridges: bridges{}, }, "", " ") if err != nil { color.Fprintf(os.Stderr, "Cannot marshal RelayInfo: %v.\n", err) @@ -206,7 +206,7 @@ func (t *torRelayScanner) loadRelays() (err error) { } if len(filtered) == 0 { - return errors.New("there are no relays within specified port number constrains!\nTry changing port numbers.") + return errors.New("there are no relays within specified port number constrains!\nTry changing port numbers") } t.relayInfo.Relays = filtered