aboutsummaryrefslogtreecommitdiff
path: root/fs.go
diff options
context:
space:
mode:
authorGravatar Erik Dubbelboer <erik@dubbelboer.com> 2019-11-16 15:38:01 +0100
committerGravatar Erik Dubbelboer <erik@dubbelboer.com> 2019-11-16 18:09:28 +0100
commit32793db72d04141d333eb04ce60170db6e79e6d2 (patch)
tree69735778f01c65ea864e696bec9fa08e83d85378 /fs.go
parentAdd Client.MaxConnDuration (diff)
downloadfasthttp-32793db72d04141d333eb04ce60170db6e79e6d2.tar.gz
fasthttp-32793db72d04141d333eb04ce60170db6e79e6d2.tar.bz2
fasthttp-32793db72d04141d333eb04ce60170db6e79e6d2.zip
Run golangci-lint using a Github Action
Diffstat (limited to 'fs.go')
-rw-r--r--fs.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs.go b/fs.go
index 1e9b4ab..ca70f72 100644
--- a/fs.go
+++ b/fs.go
@@ -194,7 +194,7 @@ func NewPathPrefixStripper(prefixSize int) PathRewriteFunc {
//
// It is prohibited copying FS values. Create new values instead.
type FS struct {
- noCopy noCopy
+ noCopy noCopy //nolint:unused,structcheck
// Path to the root directory to serve files from.
Root string
@@ -1193,7 +1193,9 @@ func readFileHeader(f *os.File, compressed bool) ([]byte, error) {
N: 512,
}
data, err := ioutil.ReadAll(lr)
- f.Seek(0, 0)
+ if _, err := f.Seek(0, 0); err != nil {
+ return nil, err
+ }
if zr != nil {
releaseGzipReader(zr)