From b30febc7c2472e5604f0a5fde922c12f346c19f1 Mon Sep 17 00:00:00 2001 From: Solomon Hykes Date: Wed, 3 Feb 2021 19:20:12 +0000 Subject: [PATCH] Fix out-of-the-blue linter errors Signed-off-by: Solomon Hykes --- dagger/fs.go | 2 +- dagger/spec_test.go | 34 ---------------------------------- 2 files changed, 1 insertion(+), 35 deletions(-) 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)