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/cmd/covdata | |
| 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/cmd/covdata')
| -rw-r--r-- | src/cmd/covdata/argsmerge.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/cmd/covdata/argsmerge.go b/src/cmd/covdata/argsmerge.go index 8815a4a838..f591e3abd4 100644 --- a/src/cmd/covdata/argsmerge.go +++ b/src/cmd/covdata/argsmerge.go @@ -4,7 +4,10 @@ package main -import "fmt" +import ( + "fmt" + "strconv" +) type argvalues struct { osargs []string @@ -49,7 +52,7 @@ func (a *argstate) Merge(state argvalues) { func (a *argstate) ArgsSummary() map[string]string { m := make(map[string]string) if len(a.state.osargs) != 0 { - m["argc"] = fmt.Sprintf("%d", len(a.state.osargs)) + m["argc"] = strconv.Itoa(len(a.state.osargs)) for k, a := range a.state.osargs { m[fmt.Sprintf("argv%d", k)] = a } |
