mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 09:18:34 +00:00
Fix typos (#3527)
This commit is contained in:
parent
c69d38ae82
commit
16de0937a8
39 changed files with 72 additions and 72 deletions
|
@ -106,7 +106,7 @@ func TestMultiBufferReadAllToByte(t *testing.T) {
|
|||
common.Must(err)
|
||||
|
||||
if l := len(b); l != 8*1024 {
|
||||
t.Error("unexpceted length from ReadAllToBytes", l)
|
||||
t.Error("unexpected length from ReadAllToBytes", l)
|
||||
}
|
||||
}
|
||||
{
|
||||
|
@ -139,7 +139,7 @@ func TestMultiBufferCopy(t *testing.T) {
|
|||
mb.Copy(lbdst)
|
||||
|
||||
if d := cmp.Diff(lb, lbdst); d != "" {
|
||||
t.Error("unexpceted different from MultiBufferCopy ", d)
|
||||
t.Error("unexpected different from MultiBufferCopy ", d)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -41,8 +41,8 @@ type BufferedReader struct {
|
|||
Reader Reader
|
||||
// Buffer is the internal buffer to be read from first
|
||||
Buffer MultiBuffer
|
||||
// Spliter is a function to read bytes from MultiBuffer
|
||||
Spliter func(MultiBuffer, []byte) (MultiBuffer, int)
|
||||
// Splitter is a function to read bytes from MultiBuffer
|
||||
Splitter func(MultiBuffer, []byte) (MultiBuffer, int)
|
||||
}
|
||||
|
||||
// BufferedBytes returns the number of bytes that is cached in this reader.
|
||||
|
@ -59,7 +59,7 @@ func (r *BufferedReader) ReadByte() (byte, error) {
|
|||
|
||||
// Read implements io.Reader. It reads from internal buffer first (if available) and then reads from the underlying reader.
|
||||
func (r *BufferedReader) Read(b []byte) (int, error) {
|
||||
spliter := r.Spliter
|
||||
spliter := r.Splitter
|
||||
if spliter == nil {
|
||||
spliter = SplitBytes
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue