summaryrefslogtreecommitdiff
path: root/plugins/rpc
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2020-11-19 17:28:30 +0300
committerValery Piashchynski <[email protected]>2020-11-19 17:28:30 +0300
commit71c81a91f9f967e41310077bd26b1dedb0b49556 (patch)
treecce9cb740bae0b9acbfc15d76823174f571a0a6c /plugins/rpc
parente9595a5c133ff02b765c0b59913593e7f91bc4e7 (diff)
huge linters fix update
Diffstat (limited to 'plugins/rpc')
-rwxr-xr-xplugins/rpc/config_test.go7
-rw-r--r--plugins/rpc/tests/plugin1.go6
2 files changed, 7 insertions, 6 deletions
diff --git a/plugins/rpc/config_test.go b/plugins/rpc/config_test.go
index 36927dd2..8b1d974a 100755
--- a/plugins/rpc/config_test.go
+++ b/plugins/rpc/config_test.go
@@ -3,15 +3,16 @@ package rpc
import (
"testing"
- json "github.com/json-iterator/go"
+ j "github.com/json-iterator/go"
"github.com/stretchr/testify/assert"
)
+var json = j.ConfigCompatibleWithStandardLibrary
+
type testCfg struct{ cfg string }
func (cfg *testCfg) Unmarshal(out interface{}) error {
- j := json.ConfigCompatibleWithStandardLibrary
- return j.Unmarshal([]byte(cfg.cfg), out)
+ return json.Unmarshal([]byte(cfg.cfg), out)
}
func TestConfig_Listener(t *testing.T) {
diff --git a/plugins/rpc/tests/plugin1.go b/plugins/rpc/tests/plugin1.go
index a8d5c216..79e98ed4 100644
--- a/plugins/rpc/tests/plugin1.go
+++ b/plugins/rpc/tests/plugin1.go
@@ -29,14 +29,14 @@ func (p1 *Plugin1) Name() string {
}
func (p1 *Plugin1) RPC() interface{} {
- return &PluginRpc{srv: p1}
+ return &PluginRPC{srv: p1}
}
-type PluginRpc struct {
+type PluginRPC struct {
srv *Plugin1
}
-func (r *PluginRpc) Hello(in string, out *string) error {
+func (r *PluginRPC) Hello(in string, out *string) error {
*out = fmt.Sprintf("Hello, username: %s", in)
return nil
}