Skip to content

Commit 5d3eee1

Browse files
author
NI
committed
Fixed misuses of fmt.Println and t.Error
1 parent f332365 commit 5d3eee1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

application/command/handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func (h *handlerSender) signal(hd Header, d []byte, buf []byte) error {
8080
dLen := len(d)
8181

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

application/commands/integer_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func TestIntegerSingleByte1(t *testing.T) {
6565
}
6666

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

7171
return
@@ -101,7 +101,7 @@ func TestIntegerSingleByte2(t *testing.T) {
101101
}
102102

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

107107
return

0 commit comments

Comments
 (0)