From 092d43c329babb41f9bbad265bfe82bb48522b64 Mon Sep 17 00:00:00 2001 From: Philippe Antoine Date: Thu, 23 Mar 2023 08:14:39 +0000 Subject: 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 TryBot-Result: Gopher Robot Reviewed-by: Bryan Mills Run-TryBot: Ian Lance Taylor Auto-Submit: Ian Lance Taylor Reviewed-by: Ian Lance Taylor --- src/net/http/triv.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/net') 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) { -- cgit v1.3