Skip to content

Commit 18a445b

Browse files
committed
Fix some typos in comments and strings
All of them were found and fixed by codespell. Signed-off-by: Stefan Weil <sw@weilnetz.de>
1 parent 1a8def6 commit 18a445b

File tree

15 files changed

+25
-25
lines changed

15 files changed

+25
-25
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
- DEPRECATE service discovery from default bridge network
9191
- Introduced new network UX
9292
- Support for multiple networks in bridge driver
93-
- Local persistance with boltdb
93+
- Local persistence with boltdb
9494

9595
## 0.4.0 (2015-07-24)
9696

api/api_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ func TestProcGetService(t *testing.T) {
709709
vars := map[string]string{urlEpID: ""}
710710
_, errRsp := procGetService(c, vars, nil)
711711
if errRsp.isOK() {
712-
t.Fatalf("Expected failure, but suceeded")
712+
t.Fatalf("Expected failure, but succeeded")
713713
}
714714
if errRsp.StatusCode != http.StatusBadRequest {
715715
t.Fatalf("Expected %d, but got: %d", http.StatusBadRequest, errRsp.StatusCode)
@@ -718,7 +718,7 @@ func TestProcGetService(t *testing.T) {
718718
vars[urlEpID] = "unknown-service-id"
719719
_, errRsp = procGetService(c, vars, nil)
720720
if errRsp.isOK() {
721-
t.Fatalf("Expected failure, but suceeded")
721+
t.Fatalf("Expected failure, but succeeded")
722722
}
723723
if errRsp.StatusCode != http.StatusNotFound {
724724
t.Fatalf("Expected %d, but got: %d. (%v)", http.StatusNotFound, errRsp.StatusCode, errRsp)
@@ -864,7 +864,7 @@ func TestProcPublishUnpublishService(t *testing.T) {
864864

865865
_, errRsp = procGetService(c, vars, nil)
866866
if errRsp.isOK() {
867-
t.Fatalf("Expected failure, but suceeded")
867+
t.Fatalf("Expected failure, but succeeded")
868868
}
869869
if errRsp.StatusCode != http.StatusNotFound {
870870
t.Fatalf("Expected %d, but got: %d. (%v)", http.StatusNotFound, errRsp.StatusCode, errRsp)
@@ -1545,7 +1545,7 @@ func checkPanic(t *testing.T) {
15451545
panic(r)
15461546
}
15471547
} else {
1548-
t.Fatalf("Expected to panic, but suceeded")
1548+
t.Fatalf("Expected to panic, but succeeded")
15491549
}
15501550
}
15511551

bitseq/sequence.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ func (s *sequence) toByteArray() ([]byte, error) {
163163
func (s *sequence) fromByteArray(data []byte) error {
164164
l := len(data)
165165
if l%12 != 0 {
166-
return fmt.Errorf("cannot deserialize byte sequence of lenght %d (%v)", l, data)
166+
return fmt.Errorf("cannot deserialize byte sequence of length %d (%v)", l, data)
167167
}
168168

169169
p := s

controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ func New(cfgOptions ...config.Option) (NetworkController, error) {
170170

171171
if c.cfg != nil && c.cfg.Cluster.Watcher != nil {
172172
if err := c.initDiscovery(c.cfg.Cluster.Watcher); err != nil {
173-
// Failing to initalize discovery is a bad situation to be in.
173+
// Failing to initialize discovery is a bad situation to be in.
174174
// But it cannot fail creating the Controller
175175
log.Errorf("Failed to Initialize Discovery : %v", err)
176176
}

driverapi/driverapi.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ type JoinInfo interface {
8989
SetGatewayIPv6(net.IP) error
9090

9191
// AddStaticRoute adds a route to the sandbox.
92-
// It may be used in addtion to or instead of a default gateway (as above).
92+
// It may be used in addition to or instead of a default gateway (as above).
9393
AddStaticRoute(destination *net.IPNet, routeType int, nextHop net.IP) error
9494

9595
// DisableGatewayService tells libnetwork not to provide Default GW for the container

driverapi/driverapi_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func TestValidateAndIsV6(t *testing.T) {
8787
t.Fatal(err)
8888
}
8989
if err = i.Validate(); err == nil {
90-
t.Fatalf("expected error but succeded")
90+
t.Fatalf("expected error but succeeded")
9191
}
9292
i.Gateway = nil
9393

@@ -96,7 +96,7 @@ func TestValidateAndIsV6(t *testing.T) {
9696
t.Fatal(err)
9797
}
9898
if err = i.Validate(); err == nil {
99-
t.Fatalf("expected error but succeded")
99+
t.Fatalf("expected error but succeeded")
100100
}
101101
delete(i.AuxAddresses, "ip2")
102102

@@ -105,7 +105,7 @@ func TestValidateAndIsV6(t *testing.T) {
105105
t.Fatal(err)
106106
}
107107
if err = i.Validate(); err == nil {
108-
t.Fatalf("expected error but succeded")
108+
t.Fatalf("expected error but succeeded")
109109
}
110110
i.Gateway = nil
111111

@@ -114,6 +114,6 @@ func TestValidateAndIsV6(t *testing.T) {
114114
t.Fatal(err)
115115
}
116116
if err = i.Validate(); err == nil {
117-
t.Fatalf("expected error but succeded")
117+
t.Fatalf("expected error but succeeded")
118118
}
119119
}

drivers/bridge/bridge.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ func (c *networkConfiguration) Conflicts(o *networkConfiguration) error {
183183
return fmt.Errorf("same configuration")
184184
}
185185

186-
// Also empty, becasue only one network with empty name is allowed
186+
// Also empty, because only one network with empty name is allowed
187187
if c.BridgeName == o.BridgeName {
188188
return fmt.Errorf("networks have same bridge name")
189189
}
@@ -450,7 +450,7 @@ func parseNetworkGenericOptions(data interface{}) (*networkConfiguration, error)
450450

451451
func (c *networkConfiguration) processIPAM(id string, ipamV4Data, ipamV6Data []driverapi.IPAMData) error {
452452
if len(ipamV4Data) > 1 || len(ipamV6Data) > 1 {
453-
return types.ForbiddenErrorf("bridge driver doesnt support multiple subnets")
453+
return types.ForbiddenErrorf("bridge driver doesn't support multiple subnets")
454454
}
455455

456456
if len(ipamV4Data) == 0 {

drivers/overlay/filter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func setFilters(cname, brName string, remove bool) error {
7878
opt = "-D"
7979
}
8080

81-
// Everytime we set filters for a new subnet make sure to move the global overlay hook to the top of the both the OUTPUT and forward chains
81+
// Every time we set filters for a new subnet make sure to move the global overlay hook to the top of the both the OUTPUT and forward chains
8282
if !remove {
8383
for _, chain := range []string{"OUTPUT", "FORWARD"} {
8484
exists := iptables.Exists(iptables.Filter, chain, "-j", globalChain)

drivers/windows/windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ func (d *driver) parseNetworkOptions(id string, genericOptions map[string]string
126126

127127
func (c *networkConfiguration) processIPAM(id string, ipamV4Data, ipamV6Data []driverapi.IPAMData) error {
128128
if len(ipamV6Data) > 0 {
129-
return types.ForbiddenErrorf("windowsshim driver doesnt support v6 subnets")
129+
return types.ForbiddenErrorf("windowsshim driver doesn't support v6 subnets")
130130
}
131131

132132
if len(ipamV4Data) == 0 {

ipams/windowsipam/windowsipam.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func (a *allocator) GetDefaultAddressSpaces() (string, string, error) {
3333
}
3434

3535
// RequestPool returns an address pool along with its unique id. This is a null ipam driver. It allocates the
36-
// subnet user asked and does not validate anything. Doesnt support subpool allocation
36+
// subnet user asked and does not validate anything. Doesn't support subpool allocation
3737
func (a *allocator) RequestPool(addressSpace, pool, subPool string, options map[string]string, v6 bool) (string, *net.IPNet, map[string]string, error) {
3838
log.Debugf("RequestPool(%s, %s, %s, %v, %t)", addressSpace, pool, subPool, options, v6)
3939
if subPool != "" || v6 {

0 commit comments

Comments
 (0)