Browse Source

fix typos

Signed-off-by: allencloud <allen.sun@daocloud.io>
allencloud 9 năm trước cách đây
mục cha
commit
6983f05b42
4 tập tin đã thay đổi với 10 bổ sung10 xóa
  1. 7 7
      builder/builder.go
  2. 1 1
      cli/cli.go
  3. 1 1
      cliconfig/config.go
  4. 1 1
      container/archive.go

+ 7 - 7
builder/builder.go

@@ -106,13 +106,13 @@ func (fi *HashedFileInfo) SetHash(h string) {
 type Backend interface {
 	// TODO: use digest reference instead of name
 
-	// GetImage looks up a Docker image referenced by `name`.
+	// GetImageOnBuild looks up a Docker image referenced by `name`.
 	GetImageOnBuild(name string) (Image, error)
-	// Tag an image with newTag
+	// TagImage tags an image with newTag
 	TagImage(newTag reference.Named, imageName string) error
-	// Pull tells Docker to pull image referenced by `name`.
+	// PullOnBuild tells Docker to pull image referenced by `name`.
 	PullOnBuild(ctx context.Context, name string, authConfigs map[string]types.AuthConfig, output io.Writer) (Image, error)
-	// ContainerAttach attaches to container.
+	// ContainerAttachRaw attaches to container.
 	ContainerAttachRaw(cID string, stdin io.ReadCloser, stdout, stderr io.Writer, stream bool) error
 	// ContainerCreate creates a new Docker container and returns potential warnings
 	ContainerCreate(types.ContainerCreateConfig) (types.ContainerCreateResponse, error)
@@ -120,13 +120,13 @@ type Backend interface {
 	ContainerRm(name string, config *types.ContainerRmConfig) error
 	// Commit creates a new Docker image from an existing Docker container.
 	Commit(string, *backend.ContainerCommitConfig) (string, error)
-	// Kill stops the container execution abruptly.
+	// ContainerKill stops the container execution abruptly.
 	ContainerKill(containerID string, sig uint64) error
-	// Start starts a new container
+	// ContainerStart starts a new container
 	ContainerStart(containerID string, hostConfig *container.HostConfig) error
 	// ContainerWait stops processing until the given container is stopped.
 	ContainerWait(containerID string, timeout time.Duration) (int, error)
-	// ContainerUpdateCmd updates container.Path and container.Args
+	// ContainerUpdateCmdOnBuild updates container.Path and container.Args
 	ContainerUpdateCmdOnBuild(containerID string, cmd []string) error
 
 	// ContainerCopy copies/extracts a source FileInfo to a destination path inside a container

+ 1 - 1
cli/cli.go

@@ -189,7 +189,7 @@ func Subcmd(name string, synopses []string, description string, exitOnError bool
 	return flags
 }
 
-// An StatusError reports an unsuccessful exit by a command.
+// StatusError reports an unsuccessful exit by a command.
 type StatusError struct {
 	Status     string
 	StatusCode int

+ 1 - 1
cliconfig/config.go

@@ -151,7 +151,7 @@ func LoadFromReader(configData io.Reader) (*ConfigFile, error) {
 }
 
 // Load reads the configuration files in the given directory, and sets up
-// the auth config information and return values.
+// the auth config information and returns values.
 // FIXME: use the internal golang config parser
 func Load(configDir string) (*ConfigFile, error) {
 	if configDir == "" {

+ 1 - 1
container/archive.go

@@ -11,7 +11,7 @@ import (
 // ResolvePath resolves the given path in the container to a resource on the
 // host. Returns a resolved path (absolute path to the resource on the host),
 // the absolute path to the resource relative to the container's rootfs, and
-// a error if the path points to outside the container's rootfs.
+// an error if the path points to outside the container's rootfs.
 func (container *Container) ResolvePath(path string) (resolvedPath, absPath string, err error) {
 	// Consider the given path as an absolute path in the container.
 	absPath = archive.PreserveTrailingDotOrSeparator(filepath.Join(string(filepath.Separator), path), path)