Skip to content

Commit

Permalink
Merge pull request #854 from testwill/string
Browse files Browse the repository at this point in the history
chore:  String() instead of fmt.Sprintf
  • Loading branch information
rogeralsing authored Oct 13, 2023
2 parents b14bb1f + 1166b0e commit 291b4cf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions remote/response_status_code_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package remote

import (
"fmt"
"testing"

"github.com/stretchr/testify/assert"
Expand All @@ -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")
}

Expand Down

0 comments on commit 291b4cf

Please sign in to comment.