diff options
| author | Philippe Antoine <contact@catenacyber.fr> | 2023-03-23 08:14:39 +0000 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2023-03-31 18:41:24 +0000 |
| commit | 092d43c329babb41f9bbad265bfe82bb48522b64 (patch) | |
| tree | a1eeb7c62a6ed5ab190e69ee0c4feb0be5818214 /src/net | |
| parent | e539461e34b1c5163220f9910b2c0360fb9f21e4 (diff) | |
| download | go-092d43c329babb41f9bbad265bfe82bb48522b64.tar.xz | |
all: replace fmt.Sprintf("%d") with strconv.Itoa
This was found by running `git grep 'fmt.Sprintf("%d",' | grep -v test | grep -v vendor`
And this was automatically fixed with gotiti https://github.com/catenacyber/gotiti
and using unconvert https://github.com/mdempsky/unconvert
to check if there was (tool which fixed another useless cast)
Change-Id: I023926bc4aa8d51de45f712ac739a0a80145c28c
GitHub-Last-Rev: 1063e32e5b69b6f9bb17673887b8c4ebe5be8fe4
GitHub-Pull-Request: golang/go#59144
Reviewed-on: https://go-review.googlesource.com/c/go/+/477675
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/net')
| -rw-r--r-- | src/net/http/triv.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net/http/triv.go b/src/net/http/triv.go index 32edbbb344..f614922c24 100644 --- a/src/net/http/triv.go +++ b/src/net/http/triv.go @@ -39,7 +39,7 @@ type Counter struct { func (ctr *Counter) String() string { ctr.mu.Lock() defer ctr.mu.Unlock() - return fmt.Sprintf("%d", ctr.n) + return strconv.Itoa(ctr.n) } func (ctr *Counter) ServeHTTP(w http.ResponseWriter, req *http.Request) { |
