Skip to content

Commit

Permalink
fix go linter issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ckt committed Jul 13, 2018
1 parent d9bbe8f commit cf47f40
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
27 changes: 27 additions & 0 deletions linter_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"Vendor": true,
"DisableAll": true,
"Enable": [
"vet",
"safesql",
"errcheck",
"goconst",
"goimports",
"varcheck",
"gas",
"staticcheck",
"gosimple",
"lll",
"unconvert",
"misspell",
"unconvert"
],
"Aggregate": true,
"WarnUnmatchedNolint": true,
"LineLength": 240,
"Exclude": [
"stun/const.go"
],
"Deadline": "300s",
"Skip": []
}
3 changes: 3 additions & 0 deletions stun/discover.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ func (c *Client) discover(conn net.PacketConn, addr *net.UDPAddr) (NATType, *Hos
c.logger.Debugln("Do Test1")
c.logger.Debugln("Send To:", changedAddr)
caddr, err := net.ResolveUDPAddr("udp", changedAddr.String())
if err != nil {
c.logger.Debugf("ResolveUDPAddr error: %v", err)
}
resp, err = c.test1(conn, caddr)
if err != nil {
return NATError, mappedAddr, err
Expand Down

0 comments on commit cf47f40

Please sign in to comment.