Skip to content

Commit

Permalink
fix: go lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
juev committed Dec 27, 2023
1 parent 47154c0 commit 2549bad
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
20 changes: 10 additions & 10 deletions models.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 ...
Expand Down
4 changes: 2 additions & 2 deletions scanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 2549bad

Please sign in to comment.