1
0
mirror of https://github.com/go-kit/kit.git synced 2025-07-15 01:04:44 +02:00

Fix unnecessary calls to Printf

This commit is contained in:
shubhendra
2021-02-25 14:30:58 +05:30
committed by Mark Sagi-Kazar
parent 801da84a68
commit abd72ba989
2 changed files with 13 additions and 1 deletions

12
.deepsource.toml Normal file
View File

@ -0,0 +1,12 @@
version = 1
test_patterns = ["**/*_test.go"]
exclude_patterns = ["examples/**"]
[[analyzers]]
name = "go"
enabled = true
[analyzers.meta]
import_paths = ["github.com/go-kit/kit"]

View File

@ -182,7 +182,7 @@ func (h *Histogram) LabelValues() []string {
func (h *Histogram) Print(w io.Writer) {
h.h.RLock()
defer h.h.RUnlock()
fmt.Fprintf(w, h.h.String())
fmt.Fprint(w, h.h.String())
}
// safeHistogram exists as gohistogram.Histogram is not goroutine-safe.