aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2017-11-20 11:16:47 +0100
committerGitHub <noreply@github.com>2017-11-20 11:16:47 +0100
commit5cf1147e1b891aee85fdd66d24cb5e8cf86531ce (patch)
treea0a4550273fd15ecb04ad6b548f13c8e3cfce2d7 /utils
parent6abcb9798743579819719eb7328f2a7bdc8a882e (diff)
parentd9b8691c6b137bb59ee185f69acf868a8f42b77d (diff)
downloadgo-git-5cf1147e1b891aee85fdd66d24cb5e8cf86531ce.tar.gz
Merge pull request #647 from ferhatelmas/typo-fixes
examples,plumbing,utils: typo fixes
Diffstat (limited to 'utils')
-rw-r--r--utils/ioutil/common.go8
-rw-r--r--utils/merkletrie/difftree.go2
-rw-r--r--utils/merkletrie/iter.go2
-rw-r--r--utils/merkletrie/noder/path.go2
4 files changed, 7 insertions, 7 deletions
diff --git a/utils/ioutil/common.go b/utils/ioutil/common.go
index 66044e2..e9dcbfe 100644
--- a/utils/ioutil/common.go
+++ b/utils/ioutil/common.go
@@ -123,13 +123,13 @@ type readerOnError struct {
}
// NewReaderOnError returns a io.Reader that call the notify function when an
-// unexpected (!io.EOF) error happends, after call Read function.
+// unexpected (!io.EOF) error happens, after call Read function.
func NewReaderOnError(r io.Reader, notify func(error)) io.Reader {
return &readerOnError{r, notify}
}
// NewReadCloserOnError returns a io.ReadCloser that call the notify function
-// when an unexpected (!io.EOF) error happends, after call Read function.
+// when an unexpected (!io.EOF) error happens, after call Read function.
func NewReadCloserOnError(r io.ReadCloser, notify func(error)) io.ReadCloser {
return NewReadCloser(NewReaderOnError(r, notify), r)
}
@@ -149,13 +149,13 @@ type writerOnError struct {
}
// NewWriterOnError returns a io.Writer that call the notify function when an
-// unexpected (!io.EOF) error happends, after call Write function.
+// unexpected (!io.EOF) error happens, after call Write function.
func NewWriterOnError(w io.Writer, notify func(error)) io.Writer {
return &writerOnError{w, notify}
}
// NewWriteCloserOnError returns a io.WriteCloser that call the notify function
-//when an unexpected (!io.EOF) error happends, after call Write function.
+//when an unexpected (!io.EOF) error happens, after call Write function.
func NewWriteCloserOnError(w io.WriteCloser, notify func(error)) io.WriteCloser {
return NewWriteCloser(NewWriterOnError(w, notify), w)
}
diff --git a/utils/merkletrie/difftree.go b/utils/merkletrie/difftree.go
index 0748865..2294096 100644
--- a/utils/merkletrie/difftree.go
+++ b/utils/merkletrie/difftree.go
@@ -54,7 +54,7 @@ package merkletrie
//
// Here is a full list of all the cases that are similar and how to
// merge them together into more general cases. Each general case
-// is labeled wiht an uppercase letter for further reference, and it
+// is labeled with an uppercase letter for further reference, and it
// is followed by the pseudocode of the checks you have to perfrom
// on both noders to see if you are in such a case, the actions to
// perform (i.e. what changes to output) and how to advance the
diff --git a/utils/merkletrie/iter.go b/utils/merkletrie/iter.go
index e3f3055..b4d4c99 100644
--- a/utils/merkletrie/iter.go
+++ b/utils/merkletrie/iter.go
@@ -198,7 +198,7 @@ func (iter *Iter) current() (noder.Path, error) {
}
// removes the current node if any, and all the frames that become empty as a
-// consecuence of this action.
+// consequence of this action.
func (iter *Iter) drop() {
frame, ok := iter.top()
if !ok {
diff --git a/utils/merkletrie/noder/path.go b/utils/merkletrie/noder/path.go
index d2e2932..e9c905c 100644
--- a/utils/merkletrie/noder/path.go
+++ b/utils/merkletrie/noder/path.go
@@ -8,7 +8,7 @@ import (
)
// Path values represent a noder and its ancestors. The root goes first
-// and the actual final noder the path is refering to will be the last.
+// and the actual final noder the path is referring to will be the last.
//
// A path implements the Noder interface, redirecting all the interface
// calls to its final noder.