Skip to content

Commit

Permalink
Fix lint errors.
Browse files Browse the repository at this point in the history
Signed-off-by: David Calavera <david.calavera@gmail.com>
  • Loading branch information
calavera committed Aug 22, 2020
1 parent 97ba9ff commit 3532479
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions lib/netext/dialer.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ func (d *Dialer) getCachedHost(addr, host, port string) (*lib.HostAddress, error

newRemote := *remote
newRemote.Port = newPort

return &newRemote, nil
}

Expand Down
8 changes: 4 additions & 4 deletions lib/netext/dialer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ func TestDialerAddr(t *testing.T) {
}

for _, tc := range testCases {
tc := tc
t.Run(tc.address, func(t *testing.T) {
addr, err := dialer.getDialAddr(tc.address)

if tc.expErr != "" {
require.EqualError(t, err, tc.expErr)
return
} else {
require.NoError(t, err)
require.Equal(t, tc.expAddress, addr)
}
require.NoError(t, err)
require.Equal(t, tc.expAddress, addr)
})
}
}
Expand Down
1 change: 1 addition & 0 deletions lib/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ func (h *HostAddress) UnmarshalText(text []byte) error {
}

*h = *nh

return nil
}

Expand Down
2 changes: 1 addition & 1 deletion lib/options_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ func TestCIDRUnmarshal(t *testing.T) {
}

func TestHostAddressUnmarshal(t *testing.T) {
var testData = []struct {
testData := []struct {
input string
expectedOutput *HostAddress
expectFailure string
Expand Down

0 comments on commit 3532479

Please sign in to comment.