1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-01-04 00:05:21 -05:00

clean lint warnings

This commit is contained in:
Darien Raymond
2017-02-20 10:33:35 +01:00
parent 7a97d73737
commit bf7906c7f0
7 changed files with 13 additions and 14 deletions

View File

@@ -43,15 +43,14 @@ func (v *BytesToBufferReader) Read() (*Buffer, error) {
return buffer, nil
}
type BufferToBytesReader struct {
type bufferToBytesReader struct {
stream Reader
current *Buffer
err error
}
// Fill fills in the internal buffer.
// Private: Visible for testing.
func (v *BufferToBytesReader) Fill() {
// fill fills in the internal buffer.
func (v *bufferToBytesReader) fill() {
b, err := v.stream.Read()
v.current = b
if err != nil {
@@ -60,13 +59,13 @@ func (v *BufferToBytesReader) Fill() {
}
}
func (v *BufferToBytesReader) Read(b []byte) (int, error) {
func (v *bufferToBytesReader) Read(b []byte) (int, error) {
if v.err != nil {
return 0, v.err
}
if v.current == nil {
v.Fill()
v.fill()
if v.err != nil {
return 0, v.err
}