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

View File

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

View File

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

View File

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