mirror of
https://github.com/containers/podman.git
synced 2025-08-06 19:44:14 +08:00

This was inspired by https://github.com/cri-o/cri-o/pull/3934 and much of the logic for it is contained there. However, in brief, a named return called "err" can cause lots of code confusion and encourages using the wrong err variable in defer statements, which can make them work incorrectly. Using a separate name which is not used elsewhere makes it very clear what the defer should be doing. As part of this, remove a large number of named returns that were not used anywhere. Most of them were once needed, but are no longer necessary after previous refactors (but were accidentally retained). Signed-off-by: Matthew Heon <matthew.heon@pm.me>
52 lines
1.1 KiB
Go
52 lines
1.1 KiB
Go
// +build !linux
|
|
|
|
package libpod
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/containers/libpod/v2/libpod/define"
|
|
"github.com/containers/libpod/v2/pkg/lookup"
|
|
spec "github.com/opencontainers/runtime-spec/specs-go"
|
|
)
|
|
|
|
func (c *Container) mountSHM(shmOptions string) error {
|
|
return define.ErrNotImplemented
|
|
}
|
|
|
|
func (c *Container) unmountSHM(mount string) error {
|
|
return define.ErrNotImplemented
|
|
}
|
|
|
|
func (c *Container) prepare() error {
|
|
return define.ErrNotImplemented
|
|
}
|
|
|
|
func (c *Container) cleanupNetwork() error {
|
|
return define.ErrNotImplemented
|
|
}
|
|
|
|
func (c *Container) generateSpec(ctx context.Context) (*spec.Spec, error) {
|
|
return nil, define.ErrNotImplemented
|
|
}
|
|
|
|
func (c *Container) checkpoint(ctx context.Context, options ContainerCheckpointOptions) error {
|
|
return define.ErrNotImplemented
|
|
}
|
|
|
|
func (c *Container) restore(ctx context.Context, options ContainerCheckpointOptions) error {
|
|
return define.ErrNotImplemented
|
|
}
|
|
|
|
func (c *Container) copyOwnerAndPerms(source, dest string) error {
|
|
return nil
|
|
}
|
|
|
|
func (c *Container) getOCICgroupPath() (string, error) {
|
|
return "", define.ErrNotImplemented
|
|
}
|
|
|
|
func (c *Container) getUserOverrides() *lookup.Overrides {
|
|
return nil
|
|
}
|