mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Typo fixed and simple code.
Signed-off-by: Ri Xu <xuri@360.net>
This commit is contained in:
parent
7dbbd4e2ba
commit
87e8a936e8
6 changed files with 6 additions and 10 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue