Add staticcheck linter
Fix issues with sync.Pool being passed an array and not a pointer. See https://github.com/dominikh/go-tools/blob/master/cmd/staticcheck/docs/checks/SA6002 Add missing tests for content.Copy Fix T.Fatal being called in a goroutine Signed-off-by: Daniel Nephin <dnephin@gmail.com>
This commit is contained in:
@@ -69,14 +69,6 @@ func createInitLayer(ctx context.Context, parent, initName string, initFn func(s
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
defer func() {
|
||||
if err != nil {
|
||||
// TODO: once implemented uncomment
|
||||
//if rerr := snapshotter.Remove(ctx, td); rerr != nil {
|
||||
// log.G(ctx).Errorf("Failed to remove snapshot %s: %v", td, merr)
|
||||
//}
|
||||
}
|
||||
}()
|
||||
|
||||
if err = mounter.Mount(td, mounts...); err != nil {
|
||||
return "", err
|
||||
|
Reference in New Issue
Block a user