1package eventstream 2 3import "fmt" 4 5// LengthError provides the error for items being larger than a maximum length. 6type LengthError struct { 7 Part string 8 Want int 9 Have int 10 Value interface{} 11} 12 13func (e LengthError) Error() string { 14 return fmt.Sprintf("%s length invalid, %d/%d, %v", 15 e.Part, e.Want, e.Have, e.Value) 16} 17 18// ChecksumError provides the error for message checksum invalidation errors. 19type ChecksumError struct{} 20 21func (e ChecksumError) Error() string { 22 return "message checksum mismatch" 23} 24