Skip to content

Commit

Permalink
style: format import
Browse files Browse the repository at this point in the history
  • Loading branch information
li-jin-gou committed May 19, 2023
1 parent 5e6479d commit 4d0a80e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion pkg/common/errors/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ var (
ErrNoFreeConns = errors.New("no free connections available to host")
ErrConnectionClosed = errors.New("connection closed")
ErrNotSupportProtocol = errors.New("not support protocol")
ErrMissingFile = errors.New("http: no such file")
ErrNoMultipartForm = errors.New("request has no multipart/form-data Content-Type")
)

Expand Down
7 changes: 4 additions & 3 deletions pkg/protocol/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,21 @@ import (
"strings"
"sync"

"github.com/cloudwego/hertz/pkg/common/errors"

"github.com/cloudwego/hertz/internal/bytesconv"
"github.com/cloudwego/hertz/internal/bytestr"
"github.com/cloudwego/hertz/internal/nocopy"
"github.com/cloudwego/hertz/pkg/common/bytebufferpool"
"github.com/cloudwego/hertz/pkg/common/compress"
"github.com/cloudwego/hertz/pkg/common/config"
"github.com/cloudwego/hertz/pkg/common/errors"
"github.com/cloudwego/hertz/pkg/common/utils"
"github.com/cloudwego/hertz/pkg/network"
"github.com/cloudwego/hertz/pkg/protocol/consts"
)

var (
errMissingFile = errors.NewPublic("http: no such file")

responseBodyPool bytebufferpool.Pool
requestBodyPool bytebufferpool.Pool

Expand Down Expand Up @@ -304,7 +305,7 @@ func (req *Request) FormFile(name string) (*multipart.FileHeader, error) {
}
fhh := mf.File[name]
if fhh == nil {
return nil, errors.ErrMissingFile
return nil, errMissingFile
}
return fhh[0], nil
}
Expand Down

0 comments on commit 4d0a80e

Please sign in to comment.