Bläddra i källkod

Merge pull request #35222 from xuri/xuri_patch

Typo fixed and simple code.
Doug Davis 7 år sedan
förälder
incheckning
239d61f04b

+ 1 - 1
builder/dockerfile/instructions/commands.go

@@ -9,7 +9,7 @@ import (
 	"github.com/docker/docker/api/types/strslice"
 	"github.com/docker/docker/api/types/strslice"
 )
 )
 
 
-// KeyValuePair represent an arbitrary named value (usefull in slice insted of map[string] string to preserve ordering)
+// KeyValuePair represent an arbitrary named value (useful in slice insted of map[string] string to preserve ordering)
 type KeyValuePair struct {
 type KeyValuePair struct {
 	Key   string
 	Key   string
 	Value string
 	Value string

+ 1 - 1
builder/dockerfile/instructions/parse.go

@@ -105,7 +105,7 @@ func ParseCommand(node *parser.Node) (Command, error) {
 	return nil, errors.Errorf("%T is not a command type", s)
 	return nil, errors.Errorf("%T is not a command type", s)
 }
 }
 
 
-// UnknownInstruction represents an error occuring when a command is unresolvable
+// UnknownInstruction represents an error occurring when a command is unresolvable
 type UnknownInstruction struct {
 type UnknownInstruction struct {
 	Line        int
 	Line        int
 	Instruction string
 	Instruction string

+ 1 - 1
daemon/network/settings.go

@@ -42,7 +42,7 @@ type AttachmentStore struct {
 	networkToNodeLBIP map[string]net.IP
 	networkToNodeLBIP map[string]net.IP
 }
 }
 
 
-// ResetAttachments clears any exsiting load balancer IP to network mapping and
+// ResetAttachments clears any existing load balancer IP to network mapping and
 // sets the mapping to the given attachments.
 // sets the mapping to the given attachments.
 func (store *AttachmentStore) ResetAttachments(attachments map[string]string) error {
 func (store *AttachmentStore) ResetAttachments(attachments map[string]string) error {
 	store.ClearAttachments()
 	store.ClearAttachments()

+ 1 - 1
integration-cli/check_test.go

@@ -333,7 +333,7 @@ func (s *DockerSwarmSuite) AddDaemon(c *check.C, joinSwarm, manager bool) *daemo
 	args := []string{"--iptables=false", "--swarm-default-advertise-addr=lo"} // avoid networking conflicts
 	args := []string{"--iptables=false", "--swarm-default-advertise-addr=lo"} // avoid networking conflicts
 	d.StartWithBusybox(c, args...)
 	d.StartWithBusybox(c, args...)
 
 
-	if joinSwarm == true {
+	if joinSwarm {
 		if len(s.daemons) > 0 {
 		if len(s.daemons) > 0 {
 			tokens := s.daemons[0].JoinTokens(c)
 			tokens := s.daemons[0].JoinTokens(c)
 			token := tokens.Worker
 			token := tokens.Worker

+ 1 - 5
integration-cli/docker_api_ipcmode_test.go

@@ -44,11 +44,7 @@ func testIpcCheckDevExists(mm string) (bool, error) {
 		}
 		}
 	}
 	}
 
 
-	if err := s.Err(); err != nil {
-		return false, err
-	}
-
-	return false, nil
+	return false, s.Err()
 }
 }
 
 
 // testIpcNonePrivateShareable is a helper function to test "none",
 // testIpcNonePrivateShareable is a helper function to test "none",

+ 1 - 1
volume/linux_parser.go

@@ -42,7 +42,7 @@ func linuxValidateAbsolute(p string) error {
 }
 }
 func (p *linuxParser) validateMountConfig(mnt *mount.Mount) error {
 func (p *linuxParser) validateMountConfig(mnt *mount.Mount) error {
 	// there was something looking like a bug in existing codebase:
 	// there was something looking like a bug in existing codebase:
-	// - validateMountConfig on linux was called with options skipping bind source existance when calling ParseMountRaw
+	// - validateMountConfig on linux was called with options skipping bind source existence when calling ParseMountRaw
 	// - but not when calling ParseMountSpec directly... nor when the unit test called it directly
 	// - but not when calling ParseMountSpec directly... nor when the unit test called it directly
 	return p.validateMountConfigImpl(mnt, true)
 	return p.validateMountConfigImpl(mnt, true)
 }
 }