Update linter for golang v1.25 compatibility
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
committed by
Christian Goll
parent
019408d076
commit
081d2ec61e
@@ -20,6 +20,7 @@ import (
|
||||
"github.com/opencontainers/umoci"
|
||||
"github.com/opencontainers/umoci/oci/layer"
|
||||
"github.com/warewulf/warewulf/internal/pkg/util"
|
||||
"github.com/warewulf/warewulf/internal/pkg/wwlog"
|
||||
)
|
||||
|
||||
type pullerOpt func(*puller) error
|
||||
@@ -140,7 +141,11 @@ func (p *puller) Pull(ctx context.Context, uri, dst string) (err error) {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer os.RemoveAll(tmpDir)
|
||||
defer func() {
|
||||
if err := os.RemoveAll(tmpDir); err != nil {
|
||||
wwlog.Warn("failed to remove temporary directory %s: %s", tmpDir, err)
|
||||
}
|
||||
}()
|
||||
|
||||
// create an oci bundle our tmpdir to avoid issues with umoci.UnpackRootfs()
|
||||
tmpRef, err := layout.ParseReference(tmpDir + ":" + "tmp")
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
func TestGetReference(t *testing.T) {
|
||||
temp, err := os.MkdirTemp(os.TempDir(), "ww-archive-*")
|
||||
assert.NoError(t, err)
|
||||
defer os.RemoveAll(temp)
|
||||
defer func() { _ = os.RemoveAll(temp) }()
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
|
||||
Reference in New Issue
Block a user