Skip to content

Commit

Permalink
Fixed misuses of fmt.Println and t.Error
Browse files Browse the repository at this point in the history
  • Loading branch information
NI committed Apr 15, 2022
1 parent f332365 commit 5d3eee1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion application/command/handler.go
Expand Up @@ -80,7 +80,7 @@ func (h *handlerSender) signal(hd Header, d []byte, buf []byte) error {
dLen := len(d)

if bufLen < dLen+1 {
panic(fmt.Sprintln("Sending signal %s:%d requires %d bytes of buffer, "+
panic(fmt.Sprintf("Sending signal %s:%d requires %d bytes of buffer, "+
"but only %d bytes is available", hd, d, dLen+1, bufLen))
}

Expand Down
4 changes: 2 additions & 2 deletions application/commands/integer_test.go
Expand Up @@ -65,7 +65,7 @@ func TestIntegerSingleByte1(t *testing.T) {
}

if mLen != 1 {
t.Error("Expecting the Integer to be marshalled into %d bytes, got "+
t.Errorf("Expecting the Integer to be marshalled into %d bytes, got "+
"%d instead", 1, mLen)

return
Expand Down Expand Up @@ -101,7 +101,7 @@ func TestIntegerSingleByte2(t *testing.T) {
}

if mLen != 1 {
t.Error("Expecting the Integer to be marshalled into %d bytes, got "+
t.Errorf("Expecting the Integer to be marshalled into %d bytes, got "+
"%d instead", 1, mLen)

return
Expand Down

0 comments on commit 5d3eee1

Please sign in to comment.