mirror of
https://github.com/pion/stun.git
synced 2025-10-09 09:40:05 +08:00
Harmonize nolint directives
This commit is contained in:
@@ -288,6 +288,7 @@ func (c *Client) SetRTO(rto time.Duration) {
|
|||||||
|
|
||||||
// StopErr occurs when Client fails to stop transaction while
|
// StopErr occurs when Client fails to stop transaction while
|
||||||
// processing error.
|
// processing error.
|
||||||
|
//
|
||||||
//nolint:errname
|
//nolint:errname
|
||||||
type StopErr struct {
|
type StopErr struct {
|
||||||
Err error // value returned by Stop()
|
Err error // value returned by Stop()
|
||||||
@@ -299,6 +300,7 @@ func (e StopErr) Error() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CloseErr indicates client close failure.
|
// CloseErr indicates client close failure.
|
||||||
|
//
|
||||||
//nolint:errname
|
//nolint:errname
|
||||||
type CloseErr struct {
|
type CloseErr struct {
|
||||||
AgentErr error
|
AgentErr error
|
||||||
|
@@ -131,6 +131,7 @@ const (
|
|||||||
CodePeerAddrFamilyMismatch ErrorCode = 443 // Peer Address Family Mismatch
|
CodePeerAddrFamilyMismatch ErrorCode = 443 // Peer Address Family Mismatch
|
||||||
)
|
)
|
||||||
|
|
||||||
|
//nolint:gocheckglobals
|
||||||
var errorReasons = map[ErrorCode][]byte{
|
var errorReasons = map[ErrorCode][]byte{
|
||||||
CodeTryAlternate: []byte("Try Alternate"),
|
CodeTryAlternate: []byte("Try Alternate"),
|
||||||
CodeBadRequest: []byte("Bad Request"),
|
CodeBadRequest: []byte("Bad Request"),
|
||||||
|
@@ -3,6 +3,7 @@ package stun
|
|||||||
import "errors"
|
import "errors"
|
||||||
|
|
||||||
// DecodeErr records an error and place when it is occurred.
|
// DecodeErr records an error and place when it is occurred.
|
||||||
|
//
|
||||||
//nolint:errname
|
//nolint:errname
|
||||||
type DecodeErr struct {
|
type DecodeErr struct {
|
||||||
Place DecodeErrPlace
|
Place DecodeErrPlace
|
||||||
|
@@ -30,7 +30,7 @@ func NewUDPServer(
|
|||||||
|
|
||||||
udpConn, err := net.ListenUDP(network, &net.UDPAddr{IP: net.ParseIP(ip), Port: 0})
|
udpConn, err := net.ListenUDP(network, &net.UDPAddr{IP: net.ParseIP(ip), Port: 0})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err) // nolint
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// necessary for ipv6
|
// necessary for ipv6
|
||||||
|
Reference in New Issue
Block a user