diff options
author | baude <bbaude@redhat.com> | 2019-07-11 05:44:12 -0500 |
---|---|---|
committer | baude <bbaude@redhat.com> | 2019-07-21 14:22:39 -0500 |
commit | db826d5d75630cca784bd7092eba5b06601ae27f (patch) | |
tree | c60cc844e499d5d57752fdb92d4036ea0487ae3c /pkg/adapter/checkpoint_restore.go | |
parent | a5aa44c583612e210cf2ba44c3313a2ff27c94da (diff) | |
download | podman-db826d5d75630cca784bd7092eba5b06601ae27f.tar.gz podman-db826d5d75630cca784bd7092eba5b06601ae27f.tar.bz2 podman-db826d5d75630cca784bd7092eba5b06601ae27f.zip |
golangci-lint round #3
this is the third round of preparing to use the golangci-lint on our
code base.
Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/adapter/checkpoint_restore.go')
-rw-r--r-- | pkg/adapter/checkpoint_restore.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/pkg/adapter/checkpoint_restore.go b/pkg/adapter/checkpoint_restore.go index 533e9e3a2..1cac86d12 100644 --- a/pkg/adapter/checkpoint_restore.go +++ b/pkg/adapter/checkpoint_restore.go @@ -4,7 +4,6 @@ package adapter import ( "context" - "io" "io/ioutil" "os" "path/filepath" @@ -35,7 +34,7 @@ func crImportFromJSON(filePath string, v interface{}) error { return errors.Wrapf(err, "Failed to read container definition %s for restore", filePath) } json := jsoniter.ConfigCompatibleWithStandardLibrary - if err = json.Unmarshal([]byte(content), v); err != nil { + if err = json.Unmarshal(content, v); err != nil { return errors.Wrapf(err, "Failed to unmarshal container definition %s for restore", filePath) } @@ -106,9 +105,8 @@ func crImportCheckpoint(ctx context.Context, runtime *libpod.Runtime, input stri ctrName := config.Name // The code to load the images is copied from create.go - var writer io.Writer // In create.go this only set if '--quiet' does not exist. - writer = os.Stderr + writer := os.Stderr rtc, err := runtime.GetConfig() if err != nil { return nil, err |