mirror of
https://github.com/containers/podman.git
synced 2025-07-15 03:02:52 +08:00
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>
This commit is contained in:
@ -6,7 +6,6 @@ import (
|
||||
"github.com/containers/libpod/libpod/events"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/ulule/deepcopier"
|
||||
)
|
||||
|
||||
// Start starts all containers within a pod
|
||||
@ -441,7 +440,9 @@ func (p *Pod) Inspect() (*PodInspect, error) {
|
||||
infraContainerID := p.state.InfraContainerID
|
||||
|
||||
config := new(PodConfig)
|
||||
deepcopier.Copy(p.config).To(config)
|
||||
if err := JSONDeepCopy(p.config, config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
inspectData := PodInspect{
|
||||
Config: config,
|
||||
State: &PodInspectState{
|
||||
|
Reference in New Issue
Block a user