summaryrefslogtreecommitdiff
path: root/libpod/runtime.go
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2022-04-22 15:10:13 +0200
committerPaul Holzinger <pholzing@redhat.com>2022-04-25 13:23:20 +0200
commitc7b16645aff27fff0b87bb2a98298693bbf20894 (patch)
treed93f86c9e13f0f87f09eb048929add31e13f8f93 /libpod/runtime.go
parentad3da638ce17439a7adbf2aa7e1b4017d583f660 (diff)
downloadpodman-c7b16645aff27fff0b87bb2a98298693bbf20894.tar.gz
podman-c7b16645aff27fff0b87bb2a98298693bbf20894.tar.bz2
podman-c7b16645aff27fff0b87bb2a98298693bbf20894.zip
enable unparam linter
The unparam linter is useful to detect unused function parameters and return values. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'libpod/runtime.go')
-rw-r--r--libpod/runtime.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/libpod/runtime.go b/libpod/runtime.go
index 07653217a..877e151a9 100644
--- a/libpod/runtime.go
+++ b/libpod/runtime.go
@@ -167,7 +167,7 @@ func NewRuntime(ctx context.Context, options ...RuntimeOption) (*Runtime, error)
if err != nil {
return nil, err
}
- return newRuntimeFromConfig(ctx, conf, options...)
+ return newRuntimeFromConfig(conf, options...)
}
// NewRuntimeFromConfig creates a new container runtime using the given
@@ -176,10 +176,10 @@ func NewRuntime(ctx context.Context, options ...RuntimeOption) (*Runtime, error)
// An error will be returned if the configuration file at the given path does
// not exist or cannot be loaded
func NewRuntimeFromConfig(ctx context.Context, userConfig *config.Config, options ...RuntimeOption) (*Runtime, error) {
- return newRuntimeFromConfig(ctx, userConfig, options...)
+ return newRuntimeFromConfig(userConfig, options...)
}
-func newRuntimeFromConfig(ctx context.Context, conf *config.Config, options ...RuntimeOption) (*Runtime, error) {
+func newRuntimeFromConfig(conf *config.Config, options ...RuntimeOption) (*Runtime, error) {
runtime := new(Runtime)
if conf.Engine.OCIRuntime == "" {
@@ -224,7 +224,7 @@ func newRuntimeFromConfig(ctx context.Context, conf *config.Config, options ...R
return nil, errors.Wrapf(err, "error starting shutdown signal handler")
}
- if err := makeRuntime(ctx, runtime); err != nil {
+ if err := makeRuntime(runtime); err != nil {
return nil, err
}
@@ -292,7 +292,7 @@ func getLockManager(runtime *Runtime) (lock.Manager, error) {
// Make a new runtime based on the given configuration
// Sets up containers/storage, state store, OCI runtime
-func makeRuntime(ctx context.Context, runtime *Runtime) (retErr error) {
+func makeRuntime(runtime *Runtime) (retErr error) {
// Find a working conmon binary
cPath, err := findConmon(runtime.config.Engine.ConmonPath)
if err != nil {
@@ -598,7 +598,7 @@ func makeRuntime(ctx context.Context, runtime *Runtime) (retErr error) {
runtime.valid = true
if runtime.doMigrate {
- if err := runtime.migrate(ctx); err != nil {
+ if err := runtime.migrate(); err != nil {
return err
}
}