@@ -19,14 +19,14 @@ type Heredoc struct {
19
19
// Represents a single line (layer) in a Dockerfile.
20
20
// For example `FROM ubuntu:xenial`
21
21
type Command struct {
22
- Cmd string // lowercased command name (ex: `from`)
23
- SubCmd string // for ONBUILD only this holds the sub-command
24
- Json bool // whether the value is written in json form
25
- Original string // The original source line
26
- StartLine int // The original source line number which starts this command
27
- EndLine int // The original source line number which ends this command
28
- Flags []string // Any flags such as `--from=...` for `COPY`.
29
- Value []string // The contents of the command (ex: `ubuntu:xenial`)
22
+ Cmd string // lowercased command name (ex: `from`)
23
+ SubCmd string // for ONBUILD only this holds the sub-command
24
+ Json bool // whether the value is written in json form
25
+ Original string // The original source line
26
+ StartLine int // The original source line number which starts this command
27
+ EndLine int // The original source line number which ends this command
28
+ Flags []string // Any flags such as `--from=...` for `COPY`.
29
+ Value []string // The contents of the command (ex: `ubuntu:xenial`)
30
30
Heredocs []Heredoc // Extra heredoc content attachments
31
31
}
32
32
@@ -96,9 +96,9 @@ func ParseReader(file io.Reader) ([]Command, error) {
96
96
for _ , heredoc := range child .Heredocs {
97
97
cmd .Original = cmd .Original + heredoc .Content + heredoc .Name + "\n "
98
98
cmd .Value = append (cmd .Value , heredoc .Content )
99
- cmd .Heredocs = append (cmd .Heredocs , Heredoc {Name : heredoc .Name ,
100
- FileDescriptor : heredoc .FileDescriptor ,
101
- Content : heredoc .Content })
99
+ cmd .Heredocs = append (cmd .Heredocs , Heredoc {Name : heredoc .Name ,
100
+ FileDescriptor : heredoc .FileDescriptor ,
101
+ Content : heredoc .Content })
102
102
}
103
103
}
104
104
0 commit comments