fix lint errors

Signed-off-by: Tony Worm <tony@hofstadter.io>
This commit is contained in:
Tony Worm 2021-03-15 08:44:49 -04:00 committed by Solomon Hykes
parent 0e32bc68f8
commit b1b534992a
2 changed files with 37 additions and 39 deletions

View File

@ -11,7 +11,7 @@ import (
contents: string | bytes
#compute: [
dagger.#WriteFile & { dest: filename, content: contents, mode: permissions}
dagger.#WriteFile & {dest: filename, content: contents, mode: permissions},
]
}
@ -21,17 +21,17 @@ import (
contents: string | bytes
from: dagger.#Artifact
orig: (#read & { path: filename, "from": from }).data
orig: (#read & {path: filename, "from": from}).data
#compute: [
dagger.#WriteFile & { dest: filename, content: "\(orig)\(contents)", mode: permissions}
dagger.#WriteFile & {dest: filename, content: "\(orig)\(contents)", mode: permissions},
]
}
#Read: {
filename: !=""
from: dagger.#Artifact
contents: (#read & { path: filename, "from": from }).data
contents: (#read & {path: filename, "from": from}).data
}
#read: {
@ -41,7 +41,7 @@ import (
string
#compute: [
dagger.#Load & {"from": from},
dagger.#Export & { source: path }
dagger.#Export & {source: path},
]
}
}
@ -50,7 +50,7 @@ import (
glob: !=""
filenames: [...string]
from: dagger.#Artifact
files: (_#glob & { "glob": glob, "from": from }).data
files: (_#glob & {"glob": glob, "from": from}).data
// trim suffix because ls always ends with newline
filenames: strings.Split(strings.TrimSuffix(files, "\n"), "\n")
}
@ -66,7 +66,7 @@ _#glob: {
dagger.#Exec & {
args: ["sh", "-c", "ls \(glob) > \(_tmppath)"]
},
dagger.#Export & { source: _tmppath }
dagger.#Export & {source: _tmppath},
]
}
}

View File

@ -35,7 +35,7 @@ TestCreate: {
TestRead: {
read: file.#Read & {
filename: "/etc/alpine-release"
from: alpine.#Image & { version: "3.10.6" }
from: alpine.#Image & {version: "3.10.6"}
}
test: #compute: [
dagger.#Load & {from: alpine.#Image},
@ -127,5 +127,3 @@ TestGlob: {
}
test: list.filenames & ["/etc/resolv.conf"]
}