Skip to content

Commit

Permalink
fix: lint code
Browse files Browse the repository at this point in the history
  • Loading branch information
byene0923 committed Aug 1, 2022
1 parent bbb0b2d commit a04a151
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/app/fs.go
Expand Up @@ -58,6 +58,7 @@ import (
"strings"
"sync"
"time"

"github.com/cloudwego/hertz/internal/bytesconv"
"github.com/cloudwego/hertz/internal/bytestr"
"github.com/cloudwego/hertz/internal/nocopy"
Expand Down Expand Up @@ -1343,7 +1344,6 @@ func (r *smallRangeReader) Close() error {
}

func (r *smallRangeReader) Read(p []byte) (int, error) {

ff := r.ff
var err error
cPos, cLen, n := 0, 0, 0
Expand Down
5 changes: 2 additions & 3 deletions pkg/app/fs_test.go
Expand Up @@ -53,11 +53,12 @@ import (
"strings"
"testing"
"time"

"github.com/cloudwego/hertz/internal/bytesconv"
"github.com/cloudwego/hertz/pkg/common/test/mock"
"github.com/cloudwego/hertz/pkg/protocol"
"github.com/cloudwego/hertz/pkg/protocol/consts"
"github.com/cloudwego/hertz/pkg/protocol/http1/resp"
"github.com/cloudwego/hertz/internal/bytesconv"
)

func TestNewVHostPathRewriter(t *testing.T) {
Expand Down Expand Up @@ -413,7 +414,6 @@ func testFSSingleByteRangeOfWriteTo(t *testing.T, h HandlerFunc, filePath string
body1, bytesconv.B2s(expectedBody[start:end+1]), filePath, startPos, endPos)
}
}

}

func testFSSingleByteRangeOfRead(t *testing.T, h HandlerFunc, filePath string) {
Expand Down Expand Up @@ -630,7 +630,6 @@ func testFSMultiByteRangeOfWriteTo(t *testing.T, h HandlerFunc, filePath string)
if body != string(singleBodys) {
t.Fatalf("multipart ranges content is invalid")
}

}

func testFSMultiByteRangeOfRead(t *testing.T, h HandlerFunc, filePath string) {
Expand Down

0 comments on commit a04a151

Please sign in to comment.