From 372cdb1ee23cfbe27c40a770ea2be52c1be04375 Mon Sep 17 00:00:00 2001 From: Cody Roseborough Date: Fri, 9 Sep 2016 09:43:39 -0700 Subject: [PATCH] General code cleanup Removes duplicate return in client/native.go Removes useless TBD comment in control/runner.go Modifies mock-file-grpc/main_test.go to load the correct plugin when testing. --- control/plugin/client/native.go | 1 - control/runner.go | 1 - .../publisher/snap-plugin-publisher-mock-file-grpc/main_test.go | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/control/plugin/client/native.go b/control/plugin/client/native.go index 95efae08b..f2eca3080 100644 --- a/control/plugin/client/native.go +++ b/control/plugin/client/native.go @@ -168,7 +168,6 @@ func (p *PluginNativeClient) Publish(metrics []core.Metric, config map[string]ct err = p.connection.Call("Publisher.Publish", out, &reply) close(done) return err - return nil } func (p *PluginNativeClient) Process(metrics []core.Metric, config map[string]ctypes.ConfigValue) ([]core.Metric, error) { diff --git a/control/runner.go b/control/runner.go index 93008498f..c2e663508 100644 --- a/control/runner.go +++ b/control/runner.go @@ -57,7 +57,6 @@ const ( MaxPluginRestartCount = 3 ) -// TBD type executablePlugin interface { Run(time.Duration) (plugin.Response, error) Kill() error diff --git a/plugin/publisher/snap-plugin-publisher-mock-file-grpc/main_test.go b/plugin/publisher/snap-plugin-publisher-mock-file-grpc/main_test.go index 2aacd6e09..f1ac32146 100644 --- a/plugin/publisher/snap-plugin-publisher-mock-file-grpc/main_test.go +++ b/plugin/publisher/snap-plugin-publisher-mock-file-grpc/main_test.go @@ -33,7 +33,7 @@ import ( ) var ( - PluginName = "snap-plugin-publisher-mock-file" + PluginName = "snap-plugin-publisher-mock-file-grpc" PluginType = "publisher" SnapPath = os.ExpandEnv(os.Getenv("SNAP_PATH")) PluginPath = path.Join(SnapPath, "plugin", PluginName)