Skip to content

Commit 27a03b1

Browse files
committed
msgpack/rpc: fix 'append with no values' vet error and for loop range
Signed-off-by: Koichi Shiraishi <[email protected]>
1 parent 79aafc4 commit 27a03b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

msgpack/rpc/rpc_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func TestEndpoint(t *testing.T) {
8686
}
8787

8888
const n = 10
89-
for i := 0; i < i; i++ {
89+
for i := 0; i < n; i++ {
9090
for j := 0; j < n; j++ {
9191
if err := client.Notify("n1", fmt.Sprintf("notif %d,%d", i, j)); err != nil {
9292
t.Fatal(err)
@@ -109,7 +109,7 @@ func TestArgs(t *testing.T) {
109109
defer cleanup()
110110

111111
if err := server.Register("n", func(a, b string) ([]string, error) {
112-
return append([]string{a, b}), nil
112+
return []string{a, b}, nil
113113
}); err != nil {
114114
t.Fatal(err)
115115
}

0 commit comments

Comments
 (0)