diff options
author | Erik Dubbelboer <erik@dubbelboer.com> | 2019-11-16 15:38:01 +0100 |
---|---|---|
committer | Erik Dubbelboer <erik@dubbelboer.com> | 2019-11-16 18:09:28 +0100 |
commit | 32793db72d04141d333eb04ce60170db6e79e6d2 (patch) | |
tree | 69735778f01c65ea864e696bec9fa08e83d85378 /fs.go | |
parent | Add Client.MaxConnDuration (diff) | |
download | fasthttp-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.go | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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) |