mirror of
https://github.com/containers/podman.git
synced 2025-08-06 03:19:52 +08:00
libpod: remove unused ContainerState() fucntion
First that function claims to deep copy but then actually return the original state so it does not work correctly, given that there are no users just remove it instead of fixing it. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@ -1220,23 +1220,6 @@ func (c *Container) HostNetwork() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// ContainerState returns containerstate struct
|
||||
func (c *Container) ContainerState() (*ContainerState, error) {
|
||||
if !c.batched {
|
||||
c.lock.Lock()
|
||||
defer c.lock.Unlock()
|
||||
|
||||
if err := c.syncContainer(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
returnConfig := new(ContainerState)
|
||||
if err := JSONDeepCopy(c.state, returnConfig); err != nil {
|
||||
return nil, fmt.Errorf("copying container %s state: %w", c.ID(), err)
|
||||
}
|
||||
return c.state, nil
|
||||
}
|
||||
|
||||
// HasHealthCheck returns bool as to whether there is a health check
|
||||
// defined for the container
|
||||
func (c *Container) HasHealthCheck() bool {
|
||||
|
Reference in New Issue
Block a user