1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #35222 from xuri/xuri_patch

Typo fixed and simple code.
This commit is contained in:
Doug Davis 2017-10-18 07:51:41 +02:00 committed by GitHub
commit 239d61f04b
6 changed files with 6 additions and 10 deletions

View file

@ -9,7 +9,7 @@ import (
"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 {
Key string
Value string

View file

@ -105,7 +105,7 @@ func ParseCommand(node *parser.Node) (Command, error) {
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 {
Line int
Instruction string

View file

@ -42,7 +42,7 @@ type AttachmentStore struct {
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.
func (store *AttachmentStore) ResetAttachments(attachments map[string]string) error {
store.ClearAttachments()

View file

@ -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
d.StartWithBusybox(c, args...)
if joinSwarm == true {
if joinSwarm {
if len(s.daemons) > 0 {
tokens := s.daemons[0].JoinTokens(c)
token := tokens.Worker

View file

@ -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",

View file

@ -42,7 +42,7 @@ func linuxValidateAbsolute(p string) error {
}
func (p *linuxParser) validateMountConfig(mnt *mount.Mount) error {
// 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
return p.validateMountConfigImpl(mnt, true)
}