From 200cfa41a434b7143620c2c252b3eb7ab3ef92f9 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Thu, 11 Jun 2020 14:40:38 -0400 Subject: Turn on More linters - misspell - prealloc - unparam - nakedret Signed-off-by: Daniel J Walsh --- libpod/runtime.go | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'libpod/runtime.go') diff --git a/libpod/runtime.go b/libpod/runtime.go index 4744de1a2..b1e48b3b3 100644 --- a/libpod/runtime.go +++ b/libpod/runtime.go @@ -286,9 +286,7 @@ func makeRuntime(ctx context.Context, runtime *Runtime) (err error) { return errors.Wrapf(err, "error retrieving runtime configuration from database") } - if err := runtime.mergeDBConfig(dbConfig); err != nil { - return errors.Wrapf(err, "error merging database config into runtime config") - } + runtime.mergeDBConfig(dbConfig) logrus.Debugf("Using graph driver %s", runtime.storageConfig.GraphDriverName) logrus.Debugf("Using graph root %s", runtime.storageConfig.GraphRoot) @@ -696,11 +694,7 @@ func (r *Runtime) configureStore() error { // Set up a storage service for creating container root filesystems from // images - storageService, err := getStorageService(r.store) - if err != nil { - return err - } - r.storageService = storageService + r.storageService = getStorageService(r.store) ir := image.NewImageRuntimeFromStore(r.store) ir.SignaturePolicyPath = r.config.Engine.SignaturePolicyPath @@ -751,7 +745,7 @@ type DBConfig struct { } // mergeDBConfig merges the configuration from the database. -func (r *Runtime) mergeDBConfig(dbConfig *DBConfig) error { +func (r *Runtime) mergeDBConfig(dbConfig *DBConfig) { c := &r.config.Engine if !r.storageSet.RunRootSet && dbConfig.StorageTmp != "" { @@ -802,7 +796,6 @@ func (r *Runtime) mergeDBConfig(dbConfig *DBConfig) error { } c.VolumePath = dbConfig.VolumePath } - return nil } func (r *Runtime) EnableLabeling() bool { -- cgit v1.2.3-54-g00ecf