1
0
mirror of https://github.com/go-kratos/kratos.git synced 2024-12-26 20:54:38 +02:00

fix(transport/http): no need to call EncodeURL twice (#3218)

This commit is contained in:
kvii 2024-03-01 11:12:06 +08:00 committed by GitHub
parent 9106991c09
commit 50cad79c96
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -132,8 +132,8 @@ func TestEncodeURL(t *testing.T) {
}
for _, test := range tests {
if EncodeURL(test.pathTemplate, test.request, test.needQuery) != test.want {
t.Fatalf("want: %s, got: %s", test.want, EncodeURL(test.pathTemplate, test.request, test.needQuery))
if path := EncodeURL(test.pathTemplate, test.request, test.needQuery); path != test.want {
t.Fatalf("want: %s, got: %s", test.want, path)
}
}
}