diff options
author | Valery Piashchynski <[email protected]> | 2020-03-21 01:03:13 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-03-21 01:03:13 +0300 |
commit | 314b161695daae7dfa8739afb1865a3be5ff53ca (patch) | |
tree | c1342d6c7a1f9ab0f786c2a4572ac0d0e2b818df /service/container_test.go | |
parent | 96e6686c5fa55e5b055fe3d7a4635e272e69c3ac (diff) |
Update GHA, go1.14 vendored mode
Update Makefile, add go vendor (go 1.14 + php hack)
Update usage of new json package
Diffstat (limited to 'service/container_test.go')
-rw-r--r-- | service/container_test.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/service/container_test.go b/service/container_test.go index 1874b355..b3ec7054 100644 --- a/service/container_test.go +++ b/service/container_test.go @@ -67,7 +67,8 @@ type testCfg struct{ cfg string } func (cfg *testCfg) Get(name string) Config { vars := make(map[string]interface{}) - err := json.Unmarshal([]byte(cfg.cfg), &vars) + j := json.ConfigCompatibleWithStandardLibrary + err := j.Unmarshal([]byte(cfg.cfg), &vars) if err != nil { panic("error unmarshalling the cfg.cfg value") } @@ -77,10 +78,13 @@ func (cfg *testCfg) Get(name string) Config { return nil } - d, _ := json.Marshal(v) + d, _ := j.Marshal(v) return &testCfg{cfg: string(d)} } -func (cfg *testCfg) Unmarshal(out interface{}) error { return json.Unmarshal([]byte(cfg.cfg), out) } +func (cfg *testCfg) Unmarshal(out interface{}) error { + j := json.ConfigCompatibleWithStandardLibrary + return j.Unmarshal([]byte(cfg.cfg), out) +} // Config defines RPC service config. type dConfig struct { |