Skip to content

Commit 4485636

Browse files
committed
Apply gofmt
1 parent cf3e388 commit 4485636

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pkg/dockerfile/parse.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func ParseReader(dockerfile io.Reader) (Metadata, error) {
4848
// (TODO see note above regarding "escape" parser directive)
4949
for line[len(line)-1] == '\\' {
5050
if !scanner.Scan() {
51-
line = line[0:len(line)-1]
51+
line = line[0 : len(line)-1]
5252
break
5353
}
5454
// "strings.TrimRightFunc(IsSpace)" because whitespace *after* the escape character is supported and ignored 🙈
@@ -64,7 +64,6 @@ func ParseReader(dockerfile io.Reader) (Metadata, error) {
6464
line = line[0:len(line)-1] + nextLine
6565
}
6666

67-
6867
// TODO *technically* a line like " RUN echo hi " should be parsed as "RUN" "echo hi" (cut off instruction, then the rest of the line with TrimSpace), but for our needs "strings.Fields" is good enough for now
6968

7069
// line = strings.TrimSpace(line) // (emulated below; "strings.Fields" does essentially the same exact thing so we don't need to do it explicitly here too)

0 commit comments

Comments
 (0)