diff --git a/dagger/fs.go b/dagger/fs.go index 5e54a9e6..1dd365f4 100644 --- a/dagger/fs.go +++ b/dagger/fs.go @@ -170,7 +170,7 @@ func bkCleanError(err error) error { msg := err.Error() for _, s := range noise { - msg = strings.Replace(msg, s, "", -1) + msg = strings.ReplaceAll(msg, s, "") } return errors.New(msg) diff --git a/dagger/spec_test.go b/dagger/spec_test.go index 07e528d2..eff49ea1 100644 --- a/dagger/spec_test.go +++ b/dagger/spec_test.go @@ -17,40 +17,6 @@ func TestMatch(t *testing.T) { Src: `do: "fetch-git", remote: "github.com/shykes/tests"`, Def: "#FetchGit", }, - //FIXME: load is temporarily disabled - // { - // Src: `do: "load", from: [{do: "exec", args: ["echo", "hello"]}]`, - // Def: "#Load", - // }, - // { - // Src: `do: "load", from: #dagger: compute: [{do: "exec", args: ["echo", "hello"]}]`, - // Def: "#Load", - // }, - // // Make sure an empty op does NOT match - // { - // Src: ``, - // Def: "", - // }, - // { - // Src: `do: "load" - //let package={bash:">3.0"} - //from: foo - //let foo={#dagger: compute: [ - // {do: "fetch-container", ref: "alpine"}, - // for pkg, info in package { - // if (info & true) != _|_ { - // do: "exec" - // args: ["echo", "hello", pkg] - // } - // if (info & string) != _|_ { - // do: "exec" - // args: ["echo", "hello", pkg, info] - // } - // } - //]} - //`, - // Def: "#Load", - // }, } for _, d := range data { testMatch(t, d.Src, d.Def)