mirror of
https://github.com/HDT3213/godis.git
synced 2025-10-04 16:32:41 +08:00
chore: use t.Errorf(...) instead of t.Error(fmt.Sprintf(...))
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package database
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/hdt3213/godis/lib/utils"
|
||||
"github.com/hdt3213/godis/redis/protocol"
|
||||
"github.com/hdt3213/godis/redis/protocol/asserts"
|
||||
@@ -74,7 +73,7 @@ func TestGeoDist(t *testing.T) {
|
||||
result := execGeoDist(testDB, utils.ToCmdLine(key, pos1, pos2, "km"))
|
||||
bulkReply, ok := result.(*protocol.BulkReply)
|
||||
if !ok {
|
||||
t.Error(fmt.Sprintf("expected bulk protocol, actually %s", result.ToBytes()))
|
||||
t.Errorf("expected bulk protocol, actually %s", result.ToBytes())
|
||||
return
|
||||
}
|
||||
dist, err := strconv.ParseFloat(string(bulkReply.Arg), 10)
|
||||
@@ -89,7 +88,7 @@ func TestGeoDist(t *testing.T) {
|
||||
result = execGeoDist(testDB, utils.ToCmdLine(key, pos1, pos2, "m"))
|
||||
bulkReply, ok = result.(*protocol.BulkReply)
|
||||
if !ok {
|
||||
t.Error(fmt.Sprintf("expected bulk protocol, actually %s", result.ToBytes()))
|
||||
t.Errorf("expected bulk protocol, actually %s", result.ToBytes())
|
||||
return
|
||||
}
|
||||
dist, err = strconv.ParseFloat(string(bulkReply.Arg), 10)
|
||||
|
Reference in New Issue
Block a user