From 3805b875c6498a9697c692c010bc022e8ebd50b0 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Tue, 1 Dec 2020 17:33:47 +0300 Subject: golangci linters fix --- plugins/metrics/plugin.go | 8 ++++---- plugins/metrics/tests/metrics_test.go | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'plugins/metrics') diff --git a/plugins/metrics/plugin.go b/plugins/metrics/plugin.go index 3fd42ee4..c115826b 100644 --- a/plugins/metrics/plugin.go +++ b/plugins/metrics/plugin.go @@ -18,8 +18,8 @@ import ( ) const ( - // ID declares public service name. - ServiceName = "metrics" + // PluginName declares plugin name. + PluginName = "metrics" // maxHeaderSize declares max header size for prometheus server maxHeaderSize = 1024 * 1024 * 100 // 104MB ) @@ -42,7 +42,7 @@ type Plugin struct { // Init service. func (m *Plugin) Init(cfg config.Configurer, log log.Logger) error { const op = errors.Op("Metrics Init") - err := cfg.UnmarshalKey(ServiceName, &m.cfg) + err := cfg.UnmarshalKey(PluginName, &m.cfg) if err != nil { return err } @@ -218,7 +218,7 @@ func (m *Plugin) AddStatProvider(name endure.Named, stat metrics.StatProvider) e // RPC interface satisfaction func (m *Plugin) Name() string { - return ServiceName + return PluginName } // RPC interface satisfaction diff --git a/plugins/metrics/tests/metrics_test.go b/plugins/metrics/tests/metrics_test.go index 4709d275..f9014c95 100644 --- a/plugins/metrics/tests/metrics_test.go +++ b/plugins/metrics/tests/metrics_test.go @@ -107,7 +107,7 @@ func TestMetricsInit(t *testing.T) { } func TestMetricsGaugeCollector(t *testing.T) { - cont, err := endure.NewContainer(nil, endure.SetLogLevel(endure.DebugLevel), endure.Visualize(endure.StdOut, "")) + cont, err := endure.NewContainer(nil, endure.SetLogLevel(endure.DebugLevel)) if err != nil { t.Fatal(err) } @@ -174,7 +174,7 @@ func TestMetricsGaugeCollector(t *testing.T) { } func TestMetricsDifferentRPCCalls(t *testing.T) { - cont, err := endure.NewContainer(nil, endure.SetLogLevel(endure.DebugLevel), endure.Visualize(endure.StdOut, "")) + cont, err := endure.NewContainer(nil, endure.SetLogLevel(endure.DebugLevel)) if err != nil { t.Fatal(err) } -- cgit v1.2.3