From aadcd0357aeb9d44a452b9b944b09d76f28f6271 Mon Sep 17 00:00:00 2001 From: maxim-konovalov Date: Mon, 13 May 2024 16:53:22 +0300 Subject: [PATCH] Fix providers lint warnings & make 0.0.11 release --- CHANGELOG.md | 6 ++++-- providers.go | 14 +++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 68adc06..7237cfa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,17 +1,19 @@ ## Unreleased +## 0.0.11 + BUG FIXES: * Fix buckets discovery (it doesn't freeze now) -## 0.0.11 - FEATURES: * BucketStat has become a public method (#21) * Add golang-ci logic REFACTOR: + +* WSL lint providers fix * Lint refactor with spaces * Split tests for shadow and not vshard module * Update Makefile with cover & lint diff --git a/providers.go b/providers.go index 0dd3555..740ced3 100644 --- a/providers.go +++ b/providers.go @@ -28,16 +28,16 @@ func (e *EmptyLogger) Warn(_ context.Context, _ string) {} type StdoutLogger struct{} -func (e *StdoutLogger) Info(ctx context.Context, msg string) { +func (e *StdoutLogger) Info(_ context.Context, msg string) { log.Println(msg) } -func (e *StdoutLogger) Debug(ctx context.Context, msg string) { +func (e *StdoutLogger) Debug(_ context.Context, msg string) { log.Println(msg) } -func (e *StdoutLogger) Error(ctx context.Context, msg string) { +func (e *StdoutLogger) Error(_ context.Context, msg string) { log.Println(msg) } -func (e *StdoutLogger) Warn(ctx context.Context, msg string) { +func (e *StdoutLogger) Warn(_ context.Context, msg string) { log.Println(msg) } @@ -54,9 +54,9 @@ type MetricsProvider interface { // you can embed this type and realize just some metrics type EmptyMetrics struct{} -func (e *EmptyMetrics) CronDiscoveryEvent(ok bool, duration time.Duration, reason string) {} -func (e *EmptyMetrics) RetryOnCall(reason string) {} -func (e *EmptyMetrics) RequestDuration(duration time.Duration, ok bool, mapReduce bool) {} +func (e *EmptyMetrics) CronDiscoveryEvent(_ bool, _ time.Duration, _ string) {} +func (e *EmptyMetrics) RetryOnCall(_ string) {} +func (e *EmptyMetrics) RequestDuration(_ time.Duration, _ bool, _ bool) {} // TopologyProvider is external module that can lookup current topology of cluster // it might be etcd/config/consul or smth else