mirror of
				https://github.com/pion/stun.git
				synced 2025-11-01 03:22:50 +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 | 	return code, reason, nil | ||||||
| } | } | ||||||
|  |  | ||||||
| var ( | const ( | ||||||
| 	// ErrAttributeNotFound means that there is no such attribute. | 	// ErrAttributeNotFound means that there is no such attribute. | ||||||
| 	ErrAttributeNotFound Error = "Attribute not found" | 	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 | 		binary.BigEndian.Uint32(b[4:8]) == magicCookie | ||||||
| } | } | ||||||
|  |  | ||||||
| var ( | const ( | ||||||
| 	// ErrUnexpectedHeaderEOF means that there were not enough bytes in | 	// ErrUnexpectedHeaderEOF means that there were not enough bytes in | ||||||
| 	// m.Raw to read header. | 	// m.Raw to read header. | ||||||
| 	ErrUnexpectedHeaderEOF Error = "unexpected EOF: not enough bytes to read header" | 	ErrUnexpectedHeaderEOF Error = "unexpected EOF: not enough bytes to read header" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Aleksandr Razumov
					Aleksandr Razumov