Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
| ... | ... |
@@ -57,7 +57,8 @@ type BuildOpts struct {
|
| 57 | 57 |
AuthConfigFile *registry.ConfigFile |
| 58 | 58 |
} |
| 59 | 59 |
|
| 60 |
-func (opts *BuildOpts) NewBuildFile(file io.ReadWriteCloser) (*buildFile, error) {
|
|
| 60 |
+func NewBuildFile(file io.ReadWriteCloser, opts *BuildOpts) (*buildFile, error) {
|
|
| 61 |
+ defer file.Close() |
|
| 61 | 62 |
ast, err := parser.Parse(file) |
| 62 | 63 |
if err != nil {
|
| 63 | 64 |
return nil, err |