-
Notifications
You must be signed in to change notification settings - Fork 29
Spelling #118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Spelling #118
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// Package multistream implements a simple stream router for the | ||
// multistream-select protocoli. The protocol is defined at | ||
// multistream-select protocol. The protocol is defined at | ||
// https://github.com/multiformats/multistream-select | ||
package multistream | ||
|
||
|
@@ -88,7 +88,7 @@ func delimWriteBuffered(w io.Writer, mes []byte) error { | |
return bw.Flush() | ||
} | ||
|
||
func delitmWriteAll(w io.Writer, messages ...[]byte) error { | ||
func delimWriteAll(w io.Writer, messages ...[]byte) error { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is based on it calling |
||
for _, mes := range messages { | ||
if err := delimWrite(w, mes); err != nil { | ||
return fmt.Errorf("failed to write messages %s, err: %v ", string(mes), err) | ||
|
@@ -159,7 +159,7 @@ func (msm *MultistreamMuxer[T]) removeHandler(protocol T) { | |
} | ||
} | ||
|
||
// Protocols returns the list of handler-names added to this this muxer. | ||
// Protocols returns the list of handler-names added to this muxer. | ||
func (msm *MultistreamMuxer[T]) Protocols() []T { | ||
msm.handlerlock.RLock() | ||
defer msm.handlerlock.RUnlock() | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -677,7 +677,7 @@ func (rob *readonlyBuffer) Close() error { | |
return nil | ||
} | ||
|
||
func TestNegotiatThenWriteFail(t *testing.T) { | ||
func TestNegotiateThenWriteFail(t *testing.T) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My understanding is that changes to go test names are fairly harmless even though they're public functions... |
||
buf := new(bytes.Buffer) | ||
|
||
err := delimWrite(buf, []byte(ProtocolID)) | ||
|
@@ -753,8 +753,8 @@ func TestNegotiatePeerSendsAndCloses(t *testing.T) { | |
if err != nil { | ||
t.Fatal(err) | ||
} | ||
delimtedProtocolID := make([]byte, buf.Len()) | ||
copy(delimtedProtocolID, buf.Bytes()) | ||
delimitedProtocolID := make([]byte, buf.Len()) | ||
copy(delimitedProtocolID, buf.Bytes()) | ||
Comment on lines
+756
to
+757
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rough guess |
||
|
||
err = delimWrite(&buf, []byte("foo")) | ||
if err != nil { | ||
|
@@ -777,7 +777,7 @@ func TestNegotiatePeerSendsAndCloses(t *testing.T) { | |
// We mock the closed stream by only expecting a single write. The | ||
// mockstream will error on any more writes (same as writing to a closed | ||
// stream) | ||
expectWrite: [][]byte{delimtedProtocolID}, | ||
expectWrite: [][]byte{delimitedProtocolID}, | ||
toRead: [][]byte{buf.Bytes()}, | ||
}, | ||
}, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't technically a spelling error, but it's easy enough to look for other things at the same time, the rule is:
Do not use
(click) here
linksFor more information, see: