mirror of
https://github.com/pion/stun.git
synced 2025-10-11 02:30:06 +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
|
||||
// processing error.
|
||||
//
|
||||
//nolint:errname
|
||||
type StopErr struct {
|
||||
Err error // value returned by Stop()
|
||||
@@ -299,6 +300,7 @@ func (e StopErr) Error() string {
|
||||
}
|
||||
|
||||
// CloseErr indicates client close failure.
|
||||
//
|
||||
//nolint:errname
|
||||
type CloseErr struct {
|
||||
AgentErr error
|
||||
|
@@ -131,6 +131,7 @@ const (
|
||||
CodePeerAddrFamilyMismatch ErrorCode = 443 // Peer Address Family Mismatch
|
||||
)
|
||||
|
||||
//nolint:gocheckglobals
|
||||
var errorReasons = map[ErrorCode][]byte{
|
||||
CodeTryAlternate: []byte("Try Alternate"),
|
||||
CodeBadRequest: []byte("Bad Request"),
|
||||
|
@@ -3,6 +3,7 @@ package stun
|
||||
import "errors"
|
||||
|
||||
// DecodeErr records an error and place when it is occurred.
|
||||
//
|
||||
//nolint:errname
|
||||
type DecodeErr struct {
|
||||
Place DecodeErrPlace
|
||||
|
@@ -30,7 +30,7 @@ func NewUDPServer(
|
||||
|
||||
udpConn, err := net.ListenUDP(network, &net.UDPAddr{IP: net.ParseIP(ip), Port: 0})
|
||||
if err != nil {
|
||||
t.Fatal(err) // nolint
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
// necessary for ipv6
|
||||
|
Reference in New Issue
Block a user