package exceptions import "fmt" type AuthenticationError struct { Code int16 Message string NeedReset bool } func NewAuthenticationError(code int16, msg string) *AuthenticationError { return &AuthenticationError{ Code: code, Message: msg, NeedReset: false, } } func (e AuthenticationError) Error() string { return fmt.Sprintf("[%d]%s", e.Code, e.Message) }