Skip to content
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

Merged
merged 1 commit into from
Aug 19, 2020
Merged

Fix go vet warnings on Go 1.15 #2401

merged 1 commit into from
Aug 19, 2020

Conversation

prymitive
Copy link
Contributor

@prymitive prymitive commented Aug 19, 2020

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 l.mierzwa@gmail.com

@prymitive prymitive requested a review from a team as a code owner August 19, 2020 08:12
@codecov
Copy link

codecov bot commented Aug 19, 2020

Codecov Report

Merging #2401 into master will decrease coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            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     
Impacted Files Coverage Δ
pkg/normalizer/service_name.go 100.00% <100.00%> (ø)
cmd/query/app/server.go 90.90% <0.00%> (-2.28%) ⬇️
cmd/query/app/static_handler.go 84.16% <0.00%> (-1.67%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 569e975...7604e98. Read the comment docs.

@@ -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]))
Copy link
Member

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))

Copy link
Contributor Author

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 <l.mierzwa@gmail.com>
@yurishkuro yurishkuro changed the title fix go vet warnings on Go 1.15 Fix go vet warnings on Go 1.15 Aug 19, 2020
@yurishkuro yurishkuro merged commit f8b1cd6 into jaegertracing:master Aug 19, 2020
@yurishkuro
Copy link
Member

Thanks!

You may want to do another PR bumping Go version in our CI and go.mod

@yurishkuro yurishkuro mentioned this pull request Aug 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants