diff options
Diffstat (limited to 'service/rpc')
-rw-r--r-- | service/rpc/config_test.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/service/rpc/config_test.go b/service/rpc/config_test.go index d0f26ec6..7a7ca13b 100644 --- a/service/rpc/config_test.go +++ b/service/rpc/config_test.go @@ -10,8 +10,11 @@ import ( type testCfg struct{ cfg string } -func (cfg *testCfg) Get(name string) service.Config { return nil } -func (cfg *testCfg) Unmarshal(out interface{}) error { return json.Unmarshal([]byte(cfg.cfg), out) } +func (cfg *testCfg) Get(name string) service.Config { return nil } +func (cfg *testCfg) Unmarshal(out interface{}) error { + j := json.ConfigCompatibleWithStandardLibrary + return j.Unmarshal([]byte(cfg.cfg), out) +} func Test_Config_Hydrate(t *testing.T) { cfg := &testCfg{`{"enable": true, "listen": "tcp://:18001"}`} |