Harmonize nolint directives

This commit is contained in:
Steffen Vogel
2023-04-12 09:50:14 +02:00
parent 2151fd82cc
commit 7c533756a6
32 changed files with 157 additions and 153 deletions

View File

@@ -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

View File

@@ -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"),

View File

@@ -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

View File

@@ -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