-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove references to io/ioutil package #45
base: master
Are you sure you want to change the base?
Conversation
30779b5
to
47af5e9
Compare
47af5e9
to
b198e8b
Compare
Package io/ioutil has been marked deprecated in Go 1.16. Signed-off-by: Austin Vazquez <[email protected]>
ebe8038
to
85dd95c
Compare
Signed-off-by: Austin Vazquez <[email protected]>
85dd95c
to
12b5c42
Compare
if err != nil { | ||
return nil, fmt.Errorf("failed to get snapshot %s from storage: %w", key, err) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolves ineffectual assignment of err. If storage.GetSnapshot
call fails then s == snapshots.Snapshot{}
or empty snapshot struct. From my read it made sense to propagate the error here instead of continuing and attempting to mount an empty snapshot. Lmk your thoughts.
@@ -182,9 +181,12 @@ func (o *snapshotter) Mounts(ctx context.Context, key string) ([]mount.Mount, er | |||
if err != nil { | |||
return nil, err | |||
} | |||
defer t.Rollback() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved just for readability / matches the standard practice of other functions in this snapshotter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be another PR
@AkihiroSuda, I removed some not required changes if you would take a second look. Enabling errcheck could probably be its own PR as most of its warnings are around checking of rollback errors on non-writable transactions which is unlikely to fail. |
env: | ||
GO111MODULE: on | ||
GO_VERSION: 1.20.x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to define env
@@ -5,6 +5,10 @@ on: | |||
push: | |||
branches: | |||
- master | |||
|
|||
env: | |||
GO_VERSION: 1.20.x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to define env
Sorry, overlooked this, needs rebase |
Package io/ioutil has been marked deprecated in Go 1.16.
Signed-off-by: Austin Vazquez [email protected]