Skip to content

Commit

Permalink
error.go: in Error() change ErrSendACK text from "ack send" to "send …
Browse files Browse the repository at this point in the history
…ack" to make it follow the same pattern as ErrSendClose.
  • Loading branch information
pnx committed Feb 2, 2023
1 parent 8798917 commit 9c66105
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion error.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (e ClientError) Error() string {
case ErrSendClose:
t = "send close"
case ErrSendACK:
t = "ack send"
t = "send ack"
case ErrParse:
t = "parse"
}
Expand Down
2 changes: 1 addition & 1 deletion error_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func TestClientError_Error(t *testing.T) {
{"ErrSockRead EOF", ClientError{ErrSockRead, "EOF"}, "shipclient - socket read: EOF"},
{"ErrSockClosed", ClientError{ErrSockClosed, ""}, "shipclient - socket closed"},
{"ErrSendClose", ClientError{ErrSendClose, ""}, "shipclient - send close"},
{"ErrSendACK", ClientError{ErrSendACK, "some message"}, "shipclient - ack send: some message"},
{"ErrSendACK", ClientError{ErrSendACK, "some message"}, "shipclient - send ack: some message"},
{"ErrParse", ClientError{ErrParse, "invalid json"}, "shipclient - parse: invalid json"},
}
for _, tt := range tests {
Expand Down

0 comments on commit 9c66105

Please sign in to comment.