浏览代码

builder: move the evaluator package code directly into builder

Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Erik Hollensbe 11 年之前
父节点
当前提交
a1522ec01c
共有 6 个文件被更改,包括 11 次插入13 次删除
  1. 5 6
      builder/builder.go
  2. 1 1
      builder/dispatchers.go
  3. 2 2
      builder/evaluator.go
  4. 1 1
      builder/internals.go
  5. 1 2
      builder/job.go
  6. 1 1
      builder/support.go

+ 5 - 6
builder/builder.go

@@ -1,17 +1,16 @@
 package builder
 
 import (
-	"github.com/docker/docker/builder/evaluator"
 	"github.com/docker/docker/runconfig"
 )
 
-// Create a new builder.
-func NewBuilder(opts *evaluator.BuildOpts) *evaluator.BuildFile {
-	return &evaluator.BuildFile{
+// Create a new builder. See
+func NewBuilder(opts *BuildOpts) *BuildFile {
+	return &BuildFile{
 		Dockerfile:    nil,
 		Config:        &runconfig.Config{},
 		Options:       opts,
-		TmpContainers: evaluator.UniqueMap{},
-		TmpImages:     evaluator.UniqueMap{},
+		TmpContainers: UniqueMap{},
+		TmpImages:     UniqueMap{},
 	}
 }

+ 1 - 1
builder/evaluator/dispatchers.go → builder/dispatchers.go

@@ -1,4 +1,4 @@
-package evaluator
+package builder
 
 // This file contains the dispatchers for each command. Note that
 // `nullDispatch` is not actually a command, but support for commands we parse

+ 2 - 2
builder/evaluator/evaluator.go → builder/evaluator.go

@@ -1,4 +1,4 @@
-// evaluator is the evaluation step in the Dockerfile parse/evaluate pipeline.
+// builder is the evaluation step in the Dockerfile parse/evaluate pipeline.
 //
 // It incorporates a dispatch table based on the parser.Node values (see the
 // parser package for more information) that are yielded from the parser itself.
@@ -17,7 +17,7 @@
 // before and after each step, such as creating an image ID and removing temporary
 // containers and images. Note that ONBUILD creates a kinda-sorta "sub run" which
 // includes its own set of steps (usually only one of them).
-package evaluator
+package builder
 
 import (
 	"bytes"

+ 1 - 1
builder/evaluator/internals.go → builder/internals.go

@@ -1,4 +1,4 @@
-package evaluator
+package builder
 
 // internals for handling commands. Covers many areas and a lot of
 // non-contiguous functionality. Please read the comments.

+ 1 - 2
builder/job.go

@@ -8,7 +8,6 @@ import (
 	"strings"
 
 	"github.com/docker/docker/archive"
-	"github.com/docker/docker/builder/evaluator"
 	"github.com/docker/docker/daemon"
 	"github.com/docker/docker/engine"
 	"github.com/docker/docker/pkg/parsers"
@@ -86,7 +85,7 @@ func (b *BuilderJob) CmdBuild(job *engine.Job) engine.Status {
 
 	sf := utils.NewStreamFormatter(job.GetenvBool("json"))
 
-	opts := &evaluator.BuildOpts{
+	opts := &BuildOpts{
 		Daemon: b.Daemon,
 		Engine: b.Engine,
 		OutStream: &utils.StdoutFormater{

+ 1 - 1
builder/evaluator/support.go → builder/support.go

@@ -1,4 +1,4 @@
-package evaluator
+package builder
 
 import (
 	"regexp"