Fix out-of-the-blue linter errors

Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
This commit is contained in:
Solomon Hykes 2021-02-03 19:20:12 +00:00
parent 17ce7cf2e8
commit b30febc7c2
2 changed files with 1 additions and 35 deletions

View File

@ -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)

View File

@ -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)