mirror of
https://github.com/pion/stun.git
synced 2025-10-30 18:46:29 +08:00
all: const instead of var for errors
This commit is contained in:
@@ -405,7 +405,7 @@ func (m *Message) GetErrorCode() (int, []byte, error) {
|
||||
return code, reason, nil
|
||||
}
|
||||
|
||||
var (
|
||||
const (
|
||||
// ErrAttributeNotFound means that there is no such attribute.
|
||||
ErrAttributeNotFound Error = "Attribute not found"
|
||||
|
||||
|
||||
2
stun.go
2
stun.go
@@ -321,7 +321,7 @@ func IsMessage(b []byte) bool {
|
||||
binary.BigEndian.Uint32(b[4:8]) == magicCookie
|
||||
}
|
||||
|
||||
var (
|
||||
const (
|
||||
// ErrUnexpectedHeaderEOF means that there were not enough bytes in
|
||||
// m.Raw to read header.
|
||||
ErrUnexpectedHeaderEOF Error = "unexpected EOF: not enough bytes to read header"
|
||||
|
||||
Reference in New Issue
Block a user