Skip to content

Commit 87e8a93

Browse files
committed
Typo fixed and simple code.
Signed-off-by: Ri Xu <xuri@360.net>
1 parent 7dbbd4e commit 87e8a93

File tree

6 files changed

+6
-10
lines changed

6 files changed

+6
-10
lines changed

builder/dockerfile/instructions/commands.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/docker/docker/api/types/strslice"
1010
)
1111

12-
// KeyValuePair represent an arbitrary named value (usefull in slice insted of map[string] string to preserve ordering)
12+
// KeyValuePair represent an arbitrary named value (useful in slice insted of map[string] string to preserve ordering)
1313
type KeyValuePair struct {
1414
Key string
1515
Value string

builder/dockerfile/instructions/parse.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ func ParseCommand(node *parser.Node) (Command, error) {
105105
return nil, errors.Errorf("%T is not a command type", s)
106106
}
107107

108-
// UnknownInstruction represents an error occuring when a command is unresolvable
108+
// UnknownInstruction represents an error occurring when a command is unresolvable
109109
type UnknownInstruction struct {
110110
Line int
111111
Instruction string

daemon/network/settings.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ type AttachmentStore struct {
4242
networkToNodeLBIP map[string]net.IP
4343
}
4444

45-
// ResetAttachments clears any exsiting load balancer IP to network mapping and
45+
// ResetAttachments clears any existing load balancer IP to network mapping and
4646
// sets the mapping to the given attachments.
4747
func (store *AttachmentStore) ResetAttachments(attachments map[string]string) error {
4848
store.ClearAttachments()

integration-cli/check_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ func (s *DockerSwarmSuite) AddDaemon(c *check.C, joinSwarm, manager bool) *daemo
333333
args := []string{"--iptables=false", "--swarm-default-advertise-addr=lo"} // avoid networking conflicts
334334
d.StartWithBusybox(c, args...)
335335

336-
if joinSwarm == true {
336+
if joinSwarm {
337337
if len(s.daemons) > 0 {
338338
tokens := s.daemons[0].JoinTokens(c)
339339
token := tokens.Worker

integration-cli/docker_api_ipcmode_test.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,7 @@ func testIpcCheckDevExists(mm string) (bool, error) {
4444
}
4545
}
4646

47-
if err := s.Err(); err != nil {
48-
return false, err
49-
}
50-
51-
return false, nil
47+
return false, s.Err()
5248
}
5349

5450
// testIpcNonePrivateShareable is a helper function to test "none",

volume/linux_parser.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func linuxValidateAbsolute(p string) error {
4242
}
4343
func (p *linuxParser) validateMountConfig(mnt *mount.Mount) error {
4444
// there was something looking like a bug in existing codebase:
45-
// - validateMountConfig on linux was called with options skipping bind source existance when calling ParseMountRaw
45+
// - validateMountConfig on linux was called with options skipping bind source existence when calling ParseMountRaw
4646
// - but not when calling ParseMountSpec directly... nor when the unit test called it directly
4747
return p.validateMountConfigImpl(mnt, true)
4848
}

0 commit comments

Comments
 (0)