Skip to content

Commit b2237d4

Browse files
committed
fixed wrong fmt verbs
1 parent c9ce111 commit b2237d4

4 files changed

+7
-7
lines changed

buffer_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func TestBuffer_Copy(t *testing.T) {
3030
}
3131

3232
if string(data) != "abcdefghij" {
33-
t.Fatalf("error expeced: %s got %d\n", "abcdefghij", string(data))
33+
t.Fatalf("error expeced: %v got %v\n", "abcdefghij", string(data))
3434
}
3535
}
3636

connect_token_private_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ func testCompareAddrs(addr1, addr2 net.UDPAddr, t *testing.T) {
102102
}
103103

104104
if addr1.Port != addr2.Port {
105-
t.Fatalf("server ports did not match: expected %s got %s\n", addr1.Port, addr2.Port)
105+
t.Fatalf("server ports did not match: expected %v got %v\n", addr1.Port, addr2.Port)
106106
}
107107

108108
}

connect_token_shared.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ func (shared *sharedTokenData) WriteShared(buffer *Buffer) error {
115115
for _, addr := range shared.ServerAddrs {
116116
host, port, err := net.SplitHostPort(addr.String())
117117
if err != nil {
118-
return fmt.Errorf("invalid port for host: %s", addr)
118+
return fmt.Errorf("invalid port for host: %v", addr)
119119
}
120120

121121
parsed := net.ParseIP(host)

connect_token_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,19 @@ func TestConnectToken(t *testing.T) {
4848
}
4949

5050
if inToken.ProtocolId != outToken.ProtocolId {
51-
t.Fatalf("ProtocolId did not match expected: %s got: %s\n", inToken.ProtocolId, outToken.ProtocolId)
51+
t.Fatalf("ProtocolId did not match expected: %v got: %v\n", inToken.ProtocolId, outToken.ProtocolId)
5252
}
5353

5454
if inToken.CreateTimestamp != outToken.CreateTimestamp {
55-
t.Fatalf("CreateTimestamp did not match expected: %s got: %s\n", inToken.CreateTimestamp, outToken.CreateTimestamp)
55+
t.Fatalf("CreateTimestamp did not match expected: %v got: %v\n", inToken.CreateTimestamp, outToken.CreateTimestamp)
5656
}
5757

5858
if inToken.ExpireTimestamp != outToken.ExpireTimestamp {
59-
t.Fatalf("ExpireTimestamp did not match expected: %s got: %s\n", inToken.ExpireTimestamp, outToken.ExpireTimestamp)
59+
t.Fatalf("ExpireTimestamp did not match expected: %v got: %v\n", inToken.ExpireTimestamp, outToken.ExpireTimestamp)
6060
}
6161

6262
if inToken.Sequence != outToken.Sequence {
63-
t.Fatalf("Sequence did not match expected: %s got: %s\n", inToken.Sequence, outToken.Sequence)
63+
t.Fatalf("Sequence did not match expected: %v got: %v\n", inToken.Sequence, outToken.Sequence)
6464
}
6565

6666
testCompareTokens(inToken, outToken, t)

0 commit comments

Comments
 (0)