aboutsummaryrefslogtreecommitdiff
path: root/fs.go
diff options
context:
space:
mode:
authorGravatar Oleksandr Redko <Oleksandr_Redko@epam.com> 2023-11-12 17:42:39 +0200
committerGravatar GitHub <noreply@github.com> 2023-11-12 16:42:39 +0100
commit8ecfc989d9c4c6c30232a6465ec17d5c6d85fc5f (patch)
tree9a1fd803e343e8363409b4d83148ebbc6203e370 /fs.go
parentLazy load stackless functions (#1656) (diff)
downloadfasthttp-8ecfc989d9c4c6c30232a6465ec17d5c6d85fc5f.tar.gz
fasthttp-8ecfc989d9c4c6c30232a6465ec17d5c6d85fc5f.tar.bz2
fasthttp-8ecfc989d9c4c6c30232a6465ec17d5c6d85fc5f.zip
Enable dupword, unconvert linters (#1658)v1.51.0
Diffstat (limited to 'fs.go')
-rw-r--r--fs.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs.go b/fs.go
index 9ada758..c231d80 100644
--- a/fs.go
+++ b/fs.go
@@ -870,7 +870,7 @@ func (cm *inMemoryCacheManager) GetFileFromCache(cacheKind CacheKind, path strin
fileCache := cm.getFsCache(cacheKind)
cm.cacheLock.Lock()
- ff, ok := fileCache[string(path)]
+ ff, ok := fileCache[path]
if ok {
ff.readersCount++
}
@@ -1594,7 +1594,7 @@ func (h *fsHandler) newFSFile(f fs.File, fileInfo fs.FileInfo, compressed bool,
}
func readFileHeader(f io.Reader, compressed bool, fileEncoding string) ([]byte, error) {
- r := io.Reader(f)
+ r := f
var (
br *brotli.Reader
zr *gzip.Reader