From 1166b0e7a226c471e40331f34d1b5523d19a0826 Mon Sep 17 00:00:00 2001 From: guoguangwu Date: Sun, 9 Jul 2023 15:43:13 +0800 Subject: [PATCH] chore: String() instead of fmt.Sprintf --- remote/response_status_code_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/remote/response_status_code_test.go b/remote/response_status_code_test.go index 33923f984..9a924b98a 100644 --- a/remote/response_status_code_test.go +++ b/remote/response_status_code_test.go @@ -1,7 +1,6 @@ package remote import ( - "fmt" "testing" "github.com/stretchr/testify/assert" @@ -11,9 +10,9 @@ func TestStatusCode_String(t *testing.T) { assert := assert.New(t) for i := 0; i < int(ResponseStatusCodeMAX); i++ { code := ResponseStatusCode(i) - assert.NotEmpty(fmt.Sprintf("%s", code)) + assert.NotEmpty(code.String()) } - s := fmt.Sprintf("%s", ResponseStatusCode(100)) + s := ResponseStatusCode(100).String() assert.Equal(s, "ResponseStatusCode-100") }