Skip to content

Commit 03e0010

Browse files
authored
Merge pull request #227 from zhangzujian/fix-typo
fix typos
2 parents 92b75c6 + e8e8f95 commit 03e0010

File tree

13 files changed

+28
-28
lines changed

13 files changed

+28
-28
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: libovsb-ci
1+
name: libovsdb-ci
22

33
on:
44
push:

.github/workflows/images.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: libovsb-images
1+
name: libovsdb-images
22

33
on:
44
push:

NOTICE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ exact contribution history, see the commit history.
88

99
Modifications Copyright 2018-2019 eBay Inc.
1010

11-
This software contains modifications developed by eBay Inc. and voluntary contibutions
11+
This software contains modifications developed by eBay Inc. and voluntary contributions
1212
from other individuals in a fork maintained at https://github.com/eBay/libovsdb
1313
For details on these contributions, please consult the git history.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
libovsdb
22
========
33

4-
[![libovsb-ci](https://github.com/ovn-org/libovsdb/actions/workflows/ci.yml/badge.svg)](https://github.com/ovn-org/libovsdb/actions/workflows/ci.yml) [![Coverage Status](https://coveralls.io/repos/github/ovn-org/libovsdb/badge.svg?branch=main)](https://coveralls.io/github/ovn-org/libovsdb?branch=main) [![Go Report Card](https://goreportcard.com/badge/github.com/ovn-org/libovsdb)](https://goreportcard.com/report/github.com/ovn-org/libovsdb)
4+
[![libovsdb-ci](https://github.com/ovn-org/libovsdb/actions/workflows/ci.yml/badge.svg)](https://github.com/ovn-org/libovsdb/actions/workflows/ci.yml) [![Coverage Status](https://coveralls.io/repos/github/ovn-org/libovsdb/badge.svg?branch=main)](https://coveralls.io/github/ovn-org/libovsdb?branch=main) [![Go Report Card](https://goreportcard.com/badge/github.com/ovn-org/libovsdb)](https://goreportcard.com/report/github.com/ovn-org/libovsdb)
55

66
An OVSDB Library written in Go
77

cache/cache.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ func (e *EventHandlerFuncs) OnDelete(table string, row model.Model) {
401401

402402
// TableCache contains a collection of RowCaches, hashed by name,
403403
// and an array of EventHandlers that respond to cache updates
404-
// It implements the ovsdb.NotifcationHandler interface so it may
404+
// It implements the ovsdb.NotificationHandler interface so it may
405405
// handle update notifications
406406
type TableCache struct {
407407
cache map[string]*RowCache
@@ -413,7 +413,7 @@ type TableCache struct {
413413
mutex sync.RWMutex
414414
}
415415

416-
// Data is the type for data that can be prepoulated in the cache
416+
// Data is the type for data that can be prepopulated in the cache
417417
type Data map[string]map[string]model.Model
418418

419419
// NewTableCache creates a new TableCache
@@ -589,7 +589,7 @@ func newColumnToValue(schemaIndexes [][]string) columnToValue {
589589
// RFC 7047 says that Indexes is a [<column-set>] and "Each <column-set> is a set of
590590
// columns whose values, taken together within any given row, must be
591591
// unique within the table". We'll store the column names, separated by comma
592-
// as we'll assuume (RFC is not clear), that comma isn't valid in a <id>
592+
// as we'll assume (RFC is not clear), that comma isn't valid in a <id>
593593
var indexes []index
594594
for i := range schemaIndexes {
595595
indexes = append(indexes, newIndex(schemaIndexes[i]...))

client/doc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Using it, the libovsdb.client package is able to properly encode and decode OVSD
2525
and store them in Model instances.
2626
A client instance is created by simply specifying the connection information and the database model:
2727
28-
ovs, _ := client.Connect(contect.Background(), dbModel)
28+
ovs, _ := client.Connect(context.Background(), dbModel)
2929
3030
Main API
3131

mapper/mapper_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ func TestMapperNewRow(t *testing.T) {
346346
assert.NotNil(t, err)
347347
} else {
348348
assert.Nil(t, err)
349-
assert.Equalf(t, test.expectedRow, row, "NewRow should match expeted")
349+
assert.Equalf(t, test.expectedRow, row, "NewRow should match expected")
350350
}
351351
})
352352
}
@@ -437,7 +437,7 @@ func TestMapperNewRowFields(t *testing.T) {
437437
assert.NotNil(t, err)
438438
} else {
439439
assert.Nil(t, err)
440-
assert.Equalf(t, test.expectedRow, row, "NewRow should match expeted")
440+
assert.Equalf(t, test.expectedRow, row, "NewRow should match expected")
441441
}
442442
})
443443
}
@@ -965,7 +965,7 @@ func TestMapperMutation(t *testing.T) {
965965
err: true,
966966
},
967967
{
968-
name: "Add elemet to set ",
968+
name: "Add element to set ",
969969
column: "set",
970970
obj: testType{},
971971
mutator: ovsdb.MutateOperationInsert,

ovsdb/condition.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func (c *Condition) UnmarshalJSON(b []byte) error {
8888

8989
// Evaluate will evaluate the condition on the two provided values
9090
// The conditions operately differently depending on the type of
91-
// the provided values. The behavjour is as described in RFC7047
91+
// the provided values. The behavior is as described in RFC7047
9292
func (c ConditionFunction) Evaluate(a interface{}, b interface{}) (bool, error) {
9393
x := reflect.ValueOf(a)
9494
y := reflect.ValueOf(b)
@@ -163,7 +163,7 @@ func (c ConditionFunction) Evaluate(a interface{}, b interface{}) (bool, error)
163163
return false, fmt.Errorf("condition not supported on %s", x.Kind())
164164
}
165165
default:
166-
return false, fmt.Errorf("unsuported condition function %s", c)
166+
return false, fmt.Errorf("unsupported condition function %s", c)
167167
}
168168
// we should never get here
169169
return false, fmt.Errorf("unreachable condition")

ovsdb/encoding_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ func TestSet(t *testing.T) {
135135
`["set",[["named-uuid","aa"],["named-uuid","bb"]]]`,
136136
},
137137
{
138-
"valud uuid",
138+
"valid uuid",
139139
validUUID0,
140140
fmt.Sprintf(`["uuid","%v"]`, validUUIDStr0),
141141
},

ovsdb/map.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
)
88

99
// OvsMap is the JSON map structure used for OVSDB
10-
// RFC 7047 uses the following notation for map as JSON doesnt support non-string keys for maps.
10+
// RFC 7047 uses the following notation for map as JSON doesn't support non-string keys for maps.
1111
// A 2-element JSON array that represents a database map value. The
1212
// first element of the array must be the string "map", and the
1313
// second element must be an array of zero or more <pair>s giving the
@@ -34,7 +34,7 @@ func (o OvsMap) MarshalJSON() ([]byte, error) {
3434
return []byte("[\"map\",[]]"), nil
3535
}
3636

37-
// UnmarshalJSON unmarshalls an OVSDB style Map from a byte array
37+
// UnmarshalJSON unmarshals an OVSDB style Map from a byte array
3838
func (o *OvsMap) UnmarshalJSON(b []byte) (err error) {
3939
var oMap []interface{}
4040
o.GoMap = make(map[interface{}]interface{})

ovsdb/rpc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func NewLockArgs(id interface{}) []interface{} {
4444
return []interface{}{id}
4545
}
4646

47-
// NotificationHandler is the interface that must be implemented to receive notifcations
47+
// NotificationHandler is the interface that must be implemented to receive notifications
4848
type NotificationHandler interface {
4949
// RFC 7047 section 4.1.6 Update Notification
5050
Update(context interface{}, tableUpdates TableUpdates)

ovsdb/schema.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ func (c *ColumnSchema) Ephemeral() bool {
507507
return false
508508
}
509509

510-
// UnmarshalJSON unmarshalls a json-formatted column
510+
// UnmarshalJSON unmarshals a json-formatted column
511511
func (c *ColumnSchema) UnmarshalJSON(data []byte) error {
512512
// ColumnJSON represents the known json values for a Column
513513
var colJSON struct {

ovsdb/schema_test.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ func TestSchema(t *testing.T) {
288288
"columns": {
289289
"wrongType": {
290290
"type": {
291-
"key": "uknown"
291+
"key": "unknown"
292292
}
293293
}
294294
}
@@ -317,7 +317,7 @@ func TestSchema(t *testing.T) {
317317
}
318318
if !reflect.DeepEqual(test.expectedSchema, schema) {
319319
t.Errorf("expected schema to be %+#v, but got: %+#v", test.expectedSchema, schema)
320-
// Struct Instrospection for debugging purpuses
320+
// Struct Introspection for debugging purposes
321321
for tname, table := range schema.Tables {
322322
for n, c := range table.Columns {
323323
ec := test.expectedSchema.Tables[tname].Columns[n]
@@ -602,7 +602,7 @@ func TestColumnSchemaEphemeral(t *testing.T) {
602602

603603
func TestColumnSchemaMarshalUnmarshalJSON(t *testing.T) {
604604
datapath := "Datapath"
605-
unlimted := -1
605+
unlimited := -1
606606
zero := 0
607607
one := 1
608608
tests := []struct {
@@ -629,7 +629,7 @@ func TestColumnSchemaMarshalUnmarshalJSON(t *testing.T) {
629629
Key: &BaseType{Type: TypeString},
630630
Value: &BaseType{Type: TypeUUID, refTable: &datapath},
631631
min: &zero,
632-
max: &unlimted,
632+
max: &unlimited,
633633
},
634634
},
635635
[]byte(`{"type":{"key": {"type": "string"},"value": {"type": "uuid","refTable": "Datapath"},"min": 0, "max": "unlimited"}}`),
@@ -642,7 +642,7 @@ func TestColumnSchemaMarshalUnmarshalJSON(t *testing.T) {
642642
TypeObj: &ColumnType{
643643
Key: &BaseType{Type: TypeUUID, refTable: &datapath},
644644
min: &zero,
645-
max: &unlimted,
645+
max: &unlimited,
646646
}},
647647
[]byte(`{"type": {"key": {"type": "uuid","refTable": "Datapath"},"min": 0, "max": "unlimited"}}`),
648648
},
@@ -1004,7 +1004,7 @@ func TestBaseTypeRefType(t *testing.T) {
10041004

10051005
func TestColumnSchema_String(t *testing.T) {
10061006
datapath := "Connection"
1007-
unlimted := -1
1007+
unlimited := -1
10081008
zero := 0
10091009
strong := "strong"
10101010
weak := "weak"
@@ -1048,7 +1048,7 @@ func TestColumnSchema_String(t *testing.T) {
10481048
TypeObj: &ColumnType{
10491049
Key: &BaseType{Type: TypeUUID, refTable: &datapath},
10501050
min: &zero,
1051-
max: &unlimted,
1051+
max: &unlimited,
10521052
},
10531053
},
10541054
"[] [Connection (strong)] (min: 0, max: -1) [M]",
@@ -1060,7 +1060,7 @@ func TestColumnSchema_String(t *testing.T) {
10601060
TypeObj: &ColumnType{
10611061
Key: &BaseType{Type: TypeUUID, refTable: &datapath, refType: &strong},
10621062
min: &zero,
1063-
max: &unlimted,
1063+
max: &unlimited,
10641064
},
10651065
},
10661066
"[] [Connection (strong)] (min: 0, max: -1) [M]",
@@ -1072,7 +1072,7 @@ func TestColumnSchema_String(t *testing.T) {
10721072
TypeObj: &ColumnType{
10731073
Key: &BaseType{Type: TypeUUID, refTable: &datapath, refType: &weak},
10741074
min: &zero,
1075-
max: &unlimted,
1075+
max: &unlimited,
10761076
},
10771077
},
10781078
"[] [Connection (weak)] (min: 0, max: -1) [M]",
@@ -1083,7 +1083,7 @@ func TestColumnSchema_String(t *testing.T) {
10831083
Type: TypeEnum,
10841084
TypeObj: &ColumnType{
10851085
Key: &BaseType{Type: TypeString, Enum: []interface{}{"permit", "deny"}},
1086-
max: &unlimted,
1086+
max: &unlimited,
10871087
min: &zero,
10881088
},
10891089
},

0 commit comments

Comments
 (0)