aboutsummaryrefslogtreecommitdiff
path: root/compress.go
diff options
context:
space:
mode:
authorGravatar Oleksandr Redko <Oleksandr_Redko@epam.com> 2023-11-24 12:33:04 +0200
committerGravatar GitHub <noreply@github.com> 2023-11-24 11:33:04 +0100
commitf196617f5598f05df49f2c15ffde70a9d908f292 (patch)
tree17029edd8643ee9c4026d188c5ce5edfe93b1141 /compress.go
parentEnable wastedassign, whitespace linters; fix issues (#1665) (diff)
downloadfasthttp-f196617f5598f05df49f2c15ffde70a9d908f292.tar.gz
fasthttp-f196617f5598f05df49f2c15ffde70a9d908f292.tar.bz2
fasthttp-f196617f5598f05df49f2c15ffde70a9d908f292.zip
chore: Use 'any' instead of 'interface{}' (#1666)
gofmt -w -r "interface{} -> any" -l .
Diffstat (limited to 'compress.go')
-rw-r--r--compress.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/compress.go b/compress.go
index 1f44f1e..895dc51 100644
--- a/compress.go
+++ b/compress.go
@@ -179,17 +179,17 @@ func WriteGzipLevel(w io.Writer, p []byte, level int) (int, error) {
var (
stacklessWriteGzipOnce sync.Once
- stacklessWriteGzipFunc func(ctx interface{}) bool
+ stacklessWriteGzipFunc func(ctx any) bool
)
-func stacklessWriteGzip(ctx interface{}) {
+func stacklessWriteGzip(ctx any) {
stacklessWriteGzipOnce.Do(func() {
stacklessWriteGzipFunc = stackless.NewFunc(nonblockingWriteGzip)
})
stacklessWriteGzipFunc(ctx)
}
-func nonblockingWriteGzip(ctxv interface{}) {
+func nonblockingWriteGzip(ctxv any) {
ctx := ctxv.(*compressCtx)
zw := acquireRealGzipWriter(ctx.w, ctx.level)
@@ -282,17 +282,17 @@ func WriteDeflateLevel(w io.Writer, p []byte, level int) (int, error) {
var (
stacklessWriteDeflateOnce sync.Once
- stacklessWriteDeflateFunc func(ctx interface{}) bool
+ stacklessWriteDeflateFunc func(ctx any) bool
)
-func stacklessWriteDeflate(ctx interface{}) {
+func stacklessWriteDeflate(ctx any) {
stacklessWriteDeflateOnce.Do(func() {
stacklessWriteDeflateFunc = stackless.NewFunc(nonblockingWriteDeflate)
})
stacklessWriteDeflateFunc(ctx)
}
-func nonblockingWriteDeflate(ctxv interface{}) {
+func nonblockingWriteDeflate(ctxv any) {
ctx := ctxv.(*compressCtx)
zw := acquireRealDeflateWriter(ctx.w, ctx.level)