Skip to content

Commit b1ebb4b

Browse files
committed
fix some typos
Signed-off-by: cui fliter <[email protected]>
1 parent 68e77ee commit b1ebb4b

File tree

9 files changed

+12
-12
lines changed

9 files changed

+12
-12
lines changed

btree/immutable/node.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ type Key struct {
4949

5050
// ID returns the unique identifier.
5151
func (k Key) ID() []byte {
52-
return k.UUID[:16] // to maintain backwards compatability
52+
return k.UUID[:16] // to maintain backwards compatibility
5353
}
5454

5555
func (k Key) ToItem() *Item {

btree/plus/btree.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ limitations under the License.
1616

1717
/*
1818
Package btree/plus implements the ubiquitous B+ tree. As of this writing,
19-
the tree is not quite finished. The delete-node merge functionaly needs
19+
the tree is not quite finished. The delete-node merge functionally needs
2020
to be added. There are also some performance improvements that can be
2121
made, with some possible concurrency mechanisms.
2222

documentation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Although rangetrees are often represented as BBSTs as described above, the n-dim
5454

5555
### Future
5656

57-
Unite both implementations of the rangetree under the same interface. The implementations (especially the immutable one) could use some futher performance optimizations.
57+
Unite both implementations of the rangetree under the same interface. The implementations (especially the immutable one) could use some further performance optimizations.
5858

5959
## Fibonacci Heap
6060

futures/selectable.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ func (f *Selectable) wchan() <-chan struct{} {
5656
return ch
5757
}
5858

59-
// WaitChan returns channel, which is closed when future is fullfilled.
59+
// WaitChan returns channel, which is closed when future is fulfilled.
6060
func (f *Selectable) WaitChan() <-chan struct{} {
6161
if atomic.LoadUint32(&f.filled) == 1 {
6262
return closed
6363
}
6464
return f.wchan()
6565
}
6666

67-
// GetResult waits for future to be fullfilled and returns value or error,
67+
// GetResult waits for future to be fulfilled and returns value or error,
6868
// whatever is set first
6969
func (f *Selectable) GetResult() (interface{}, error) {
7070
if atomic.LoadUint32(&f.filled) == 0 {
@@ -73,7 +73,7 @@ func (f *Selectable) GetResult() (interface{}, error) {
7373
return f.val, f.err
7474
}
7575

76-
// Fill sets value for future, if it were not already fullfilled
76+
// Fill sets value for future, if it were not already fulfilled
7777
// Returns error, if it were already set to future.
7878
func (f *Selectable) Fill(v interface{}, e error) error {
7979
f.m.Lock()

queue/queue.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Modified for use with Go with the addition of some dispose semantics providing
3333
the capability to release blocked threads. This works for both puts
3434
and gets, either will return an error if they are blocked and the buffer
3535
is disposed. This could serve as a signal to kill a goroutine. All threadsafety
36-
is acheived using CAS operations, making this buffer pretty quick.
36+
is achieved using CAS operations, making this buffer pretty quick.
3737
3838
Benchmarks:
3939
BenchmarkPriorityQueue-8 2000000 782 ns/op

set/dict.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ TODO: Actually write custom hashmap using the hash/fnv hasher.
2222
2323
TODO: Our Set implementation Could be further optimized by getting the uintptr
2424
of the generic interface{} used and using that as the key; Golang maps handle
25-
uintptr much better than the generic interace{} key.
25+
uintptr much better than the generic interface{} key.
2626
*/
2727

2828
package set
@@ -146,7 +146,7 @@ func New(items ...interface{}) *Set {
146146
for _, item := range items {
147147
set.items[item] = struct{}{}
148148
}
149-
149+
150150
if len(items) > 0 {
151151
set.flattened = nil
152152
}

slice/skip/skip.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Delete: O(log n)
2727
Space: O(n)
2828
2929
Recently added is the capability to address, insert, and replace an
30-
entry by position. This capability is acheived by saving the width
30+
entry by position. This capability is achieved by saving the width
3131
of the "gap" between two nodes. Searching for an item by position is
3232
very similar to searching by value in that the same basic algorithm is
3333
used but we are searching for width instead of value. Because this avoids

tree/avl/avl.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ package avl
3434

3535
import "math"
3636

37-
// Immutable represents an immutable AVL tree. This is acheived
37+
// Immutable represents an immutable AVL tree. This is achieved
3838
// by branch copying.
3939
type Immutable struct {
4040
root *node

trie/yfast/yfast.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ func (yfast *YFastTrie) predecessor(key uint64) Entry {
237237
}
238238

239239
// Predecessor returns an Entry with a key equal to or immediately
240-
// preceeding than the provided key. If such an Entry does not exist
240+
// preceding than the provided key. If such an Entry does not exist
241241
// this returns nil.
242242
func (yfast *YFastTrie) Predecessor(key uint64) Entry {
243243
entry := yfast.predecessor(key)

0 commit comments

Comments
 (0)