builder: rewrote NewBuildFile according to tibor's comments
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
This commit is contained in:
parent
22c46af4b3
commit
bb36902db6
|
@ -57,7 +57,8 @@ type BuildOpts struct {
|
||||||
AuthConfigFile *registry.ConfigFile
|
AuthConfigFile *registry.ConfigFile
|
||||||
}
|
}
|
||||||
|
|
||||||
func (opts *BuildOpts) NewBuildFile(file io.ReadWriteCloser) (*buildFile, error) {
|
func NewBuildFile(file io.ReadWriteCloser, opts *BuildOpts) (*buildFile, error) {
|
||||||
|
defer file.Close()
|
||||||
ast, err := parser.Parse(file)
|
ast, err := parser.Parse(file)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
Loading…
Reference in New Issue