diff options
author | Matthew Heon <matthew.heon@pm.me> | 2019-03-25 15:43:38 -0400 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2019-03-27 20:00:31 -0400 |
commit | 5ed62991dcbe85e28774b036a7c89033af80136f (patch) | |
tree | ea5b57abb6290bf0afac083292aad6dc653f52be /pkg/adapter/pods_remote.go | |
parent | 340eeec1b654880f9d339c9ac2957bcaeaee6829 (diff) | |
download | podman-5ed62991dcbe85e28774b036a7c89033af80136f.tar.gz podman-5ed62991dcbe85e28774b036a7c89033af80136f.tar.bz2 podman-5ed62991dcbe85e28774b036a7c89033af80136f.zip |
Remove ulele/deepcopier in favor of JSON deep copy
We have a very high performance JSON library that doesn't need to
perform code generation. Let's use it instead of our questionably
performant, reflection-dependent deep copy library.
Most changes because some functions can now return errors.
Also converts cmd/podman to use jsoniter, instead of pkg/json,
for increased performance.
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'pkg/adapter/pods_remote.go')
-rw-r--r-- | pkg/adapter/pods_remote.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/adapter/pods_remote.go b/pkg/adapter/pods_remote.go index ef8de90a6..4a32607a2 100644 --- a/pkg/adapter/pods_remote.go +++ b/pkg/adapter/pods_remote.go @@ -14,7 +14,6 @@ import ( "github.com/containers/libpod/libpod" "github.com/containers/libpod/pkg/varlinkapi" "github.com/pkg/errors" - "github.com/ulule/deepcopier" ) // Pod ... @@ -99,7 +98,9 @@ func (r *LocalRuntime) LookupPod(nameOrID string) (*Pod, error) { // the data of a remotepod data struct func (p *Pod) Inspect() (*libpod.PodInspect, error) { config := new(libpod.PodConfig) - deepcopier.Copy(p.remotepod.config).To(config) + if err := libpod.JSONDeepCopy(p.remotepod.config, config); err != nil { + return nil, err + } inspectData := libpod.PodInspect{ Config: config, State: p.remotepod.state, |