-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix go vet warnings on Go 1.15 #2401
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2401 +/- ##
==========================================
- Coverage 95.63% 95.60% -0.04%
==========================================
Files 206 206
Lines 10549 10549
==========================================
- Hits 10089 10085 -4
- Misses 393 395 +2
- Partials 67 69 +2
Continue to review full report at Codecov.
|
pkg/normalizer/service_name.go
Outdated
@@ -54,7 +55,7 @@ func newServiceNameReplacer() *strings.Replacer { | |||
oldnew := make([]string, 0, 2*(256-2-10-int('z'-'a'+1))) | |||
for i := range mapping { | |||
if mapping[i] != byte(i) { | |||
oldnew = append(oldnew, string(i), string(mapping[i])) | |||
oldnew = append(oldnew, fmt.Sprintf("%c", i), fmt.Sprintf("%c", mapping[i])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the recommendation from 1.15 release notes is to use string(rune(i))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated, thanks
go vet reports 3 issues when using Go 1.15: go vet ./... crossdock/services/tracehandler_test.go:40:12: conversion from untyped int to TraceID (string) yields a string of one rune, not a string of digits (did you mean fmt.Sprint(x)?) crossdock/services/tracehandler_test.go:252:90: conversion from untyped int to TraceID (string) yields a string of one rune, not a string of digits (did you mean fmt.Sprint(x)?) pkg/normalizer/service_name.go:57:28: conversion from int to string yields a string of one rune, not a string of digits (did you mean fmt.Sprint(x)?) Signed-off-by: Łukasz Mierzwa <[email protected]>
Thanks! You may want to do another PR bumping Go version in our CI and go.mod |
go vet reports 3 issues when using Go 1.15:
Signed-off-by: Łukasz Mierzwa [email protected]