ax(node): rename msg to errorMessage in NewErrorMessage
AX Principle 1: Predictable names over short names. `msg` is an abbreviation; `errorMessage` names what it is. Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
parent
ba72f3e408
commit
aba728ff83
1 changed files with 3 additions and 3 deletions
|
|
@ -255,13 +255,13 @@ const (
|
|||
// errorMessage, _ := NewErrorMessage(identity.ID, msg.From, ErrCodeOperationFailed, err.Error(), msg.ID)
|
||||
// conn.Send(errorMessage)
|
||||
func NewErrorMessage(from, to string, code int, message string, replyTo string) (*Message, error) {
|
||||
msg, err := NewMessage(MsgError, from, to, ErrorPayload{
|
||||
errorMessage, err := NewMessage(MsgError, from, to, ErrorPayload{
|
||||
Code: code,
|
||||
Message: message,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
msg.ReplyTo = replyTo
|
||||
return msg, nil
|
||||
errorMessage.ReplyTo = replyTo
|
||||
return errorMessage, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue